Class SimpleCouchbaseClientFactory
java.lang.Object
org.springframework.data.couchbase.SimpleCouchbaseClientFactory
- All Implemented Interfaces:
Closeable,AutoCloseable,CouchbaseClientFactory
The default implementation of a
CouchbaseClientFactory.- Author:
- Michael Nitschinger, Michael Reiche
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleCouchbaseClientFactory(com.couchbase.client.java.Cluster cluster, String bucketName, String scopeName) SimpleCouchbaseClientFactory(String connectionString, com.couchbase.client.core.env.Authenticator authenticator, String bucketName) SimpleCouchbaseClientFactory(String connectionString, com.couchbase.client.core.env.Authenticator authenticator, String bucketName, String scopeName) SimpleCouchbaseClientFactory(String connectionString, com.couchbase.client.core.env.Authenticator authenticator, String bucketName, String scopeName, com.couchbase.client.java.env.ClusterEnvironment environment) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()com.couchbase.client.java.BucketProvides access to the managed SDKBucketreference.com.couchbase.client.java.ClusterProvides access to the managed SDKClusterreference.com.couchbase.client.java.CollectiongetCollection(String collectionName) Provides access to a collection (identified by its name) in managed SDKScopereference.com.couchbase.client.java.CollectionProvides access to the default collection.The exception translator used on the factory.com.couchbase.client.java.ScopegetScope()Provides access to the managed SDKScopereference.Returns a newCouchbaseClientFactoryset to the scope given as an argument.
-
Constructor Details
-
SimpleCouchbaseClientFactory
-
SimpleCouchbaseClientFactory
-
SimpleCouchbaseClientFactory
-
SimpleCouchbaseClientFactory
-
-
Method Details
-
withScope
Description copied from interface:CouchbaseClientFactoryReturns a newCouchbaseClientFactoryset to the scope given as an argument.- Specified by:
withScopein interfaceCouchbaseClientFactory- Parameters:
scopeName- the name of the scope to use for all collection access.- Returns:
- a new client factory, bound to the other scope.
-
getCluster
public com.couchbase.client.java.Cluster getCluster()Description copied from interface:CouchbaseClientFactoryProvides access to the managed SDKClusterreference.- Specified by:
getClusterin interfaceCouchbaseClientFactory
-
getBucket
public com.couchbase.client.java.Bucket getBucket()Description copied from interface:CouchbaseClientFactoryProvides access to the managed SDKBucketreference.- Specified by:
getBucketin interfaceCouchbaseClientFactory
-
getScope
public com.couchbase.client.java.Scope getScope()Description copied from interface:CouchbaseClientFactoryProvides access to the managed SDKScopereference.- Specified by:
getScopein interfaceCouchbaseClientFactory
-
getCollection
Description copied from interface:CouchbaseClientFactoryProvides access to a collection (identified by its name) in managed SDKScopereference.- Specified by:
getCollectionin interfaceCouchbaseClientFactory- Parameters:
collectionName- the name of the collection. If null is passed in, the default collection is assumed.
-
getDefaultCollection
public com.couchbase.client.java.Collection getDefaultCollection()Description copied from interface:CouchbaseClientFactoryProvides access to the default collection.- Specified by:
getDefaultCollectionin interfaceCouchbaseClientFactory
-
getExceptionTranslator
Description copied from interface:CouchbaseClientFactoryThe exception translator used on the factory.- Specified by:
getExceptionTranslatorin interfaceCouchbaseClientFactory
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-