@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 neseccery.") public class CouchbaseClusterService extends AbstractControllerService implements CouchbaseClusterControllerService
| Modifier and Type | Field and Description |
|---|---|
private static 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 |
| Constructor and Description |
|---|
CouchbaseClusterService() |
| Modifier and Type | Method and Description |
|---|---|
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)
Open a bucket connection.
|
void |
shutdown()
Disconnect from the Couchbase cluster.
|
getControllerServiceLookup, getIdentifier, getLogger, getProperties, getProperty, getStateManager, init, initialize, onConfigurationChangecustomValidate, equals, getPropertyDescriptor, getPropertyDescriptors, hashCode, onPropertyModified, toString, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitinitializegetIdentifier, getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validatepublic static final PropertyDescriptor CONNECTION_STRING
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 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)
CouchbaseClusterControllerServiceopenBucket in interface CouchbaseClusterControllerServicebucketName - the bucket name to access@OnDisabled public void shutdown()
Copyright © 2017 Apache NiFi Project. All rights reserved.