Interface CouchbaseClientFactory
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Implementing Classes:
SimpleCouchbaseClientFactory
The
CouchbaseClientFactory
is the main way to get access to the managed SDK instance and resources.
Please note that a single factory is always bound to a Bucket
, so if you need to access more than one
you need to initialize one factory for each.
-
Method Summary
Modifier and TypeMethodDescriptioncom.couchbase.client.java.Bucket
Provides access to the managed SDKBucket
reference.com.couchbase.client.java.Cluster
Provides access to the managed SDKCluster
reference.com.couchbase.client.java.Collection
getCollection
(String name) Provides access to a collection (identified by its name) in managed SDKScope
reference.com.couchbase.client.java.Collection
Provides access to the default collection.The exception translator used on the factory.com.couchbase.client.java.Scope
getScope()
Provides access to the managed SDKScope
reference.Returns a newCouchbaseClientFactory
set to the scope given as an argument.
-
Method Details
-
getCluster
com.couchbase.client.java.Cluster getCluster()Provides access to the managed SDKCluster
reference. -
getBucket
com.couchbase.client.java.Bucket getBucket()Provides access to the managed SDKBucket
reference. -
getScope
com.couchbase.client.java.Scope getScope()Provides access to the managed SDKScope
reference. -
getCollection
Provides access to a collection (identified by its name) in managed SDKScope
reference.- Parameters:
name
- the name of the collection. If null is passed in, the default collection is assumed.
-
getDefaultCollection
com.couchbase.client.java.Collection getDefaultCollection()Provides access to the default collection. -
withScope
Returns a newCouchbaseClientFactory
set to the scope given as an argument.- Parameters:
scopeName
- the name of the scope to use for all collection access.- Returns:
- a new client factory, bound to the other scope.
-
getExceptionTranslator
PersistenceExceptionTranslator getExceptionTranslator()The exception translator used on the factory.
-