@CapabilityDescription(value="Provides a centralized Couchbase connection and bucket passwords management. Bucket passwords can be specified via dynamic properties.") @Tags(value={"nosql","couchbase","database","connection"}) @DynamicProperty(name="Bucket Password for BUCKET_NAME", value="bucket password", description="Specify bucket password if necessary. Couchbase Server 5.0 or later should use \'User Name\' and \'User Password\' instead.") public class CouchbaseClusterService extends AbstractControllerService implements CouchbaseClusterControllerService
| Modifier and Type | Field and Description |
|---|---|
private Map<String,String> |
bucketPasswords |
private com.couchbase.client.java.CouchbaseCluster |
cluster |
static PropertyDescriptor |
CONNECTION_STRING |
private static String |
DYNAMIC_PROP_BUCKET_PASSWORD |
private static List<PropertyDescriptor> |
properties |
static PropertyDescriptor |
USER_NAME |
static PropertyDescriptor |
USER_PASSWORD |
| Constructor and Description |
|---|
CouchbaseClusterService() |
| Modifier and Type | Method and Description |
|---|---|
protected Collection<ValidationResult> |
customValidate(ValidationContext context) |
protected PropertyDescriptor |
getSupportedDynamicPropertyDescriptor(String propertyDescriptorName) |
protected List<PropertyDescriptor> |
getSupportedPropertyDescriptors() |
void |
onConfigured(ConfigurationContext context)
Establish a connection to a Couchbase cluster.
|
com.couchbase.client.java.Bucket |
openBucket(String bucketName) |
void |
shutdown()
Disconnect from the Couchbase cluster.
|
abstractClearConfigContext, abstractStoreConfigContext, disabled, enabled, getConfigurationContext, getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, getProperty, getStateManager, init, initialize, isEnabledequals, getPropertyDescriptor, getPropertyDescriptors, hashCode, onPropertyModified, toString, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitinitialize, isStatefulgetIdentifier, getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validatepublic static final PropertyDescriptor CONNECTION_STRING
public static final PropertyDescriptor USER_NAME
public static final PropertyDescriptor USER_PASSWORD
private static final List<PropertyDescriptor> properties
private static final String DYNAMIC_PROP_BUCKET_PASSWORD
private volatile com.couchbase.client.java.CouchbaseCluster cluster
protected List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors in class AbstractConfigurableComponentprotected PropertyDescriptor getSupportedDynamicPropertyDescriptor(String propertyDescriptorName)
getSupportedDynamicPropertyDescriptor in class AbstractConfigurableComponentprotected Collection<ValidationResult> customValidate(ValidationContext context)
customValidate in class AbstractConfigurableComponent@OnEnabled public void onConfigured(ConfigurationContext context) throws InitializationException
context - the configuration contextInitializationException - if unable to connect a Couchbase clusterpublic com.couchbase.client.java.Bucket openBucket(String bucketName)
openBucket in interface CouchbaseClusterControllerService@OnDisabled public void shutdown()
Copyright © 2024 Apache NiFi Project. All rights reserved.