public interface CouchbaseClientFactory extends Closeable
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.
Modifier and Type | Method and Description |
---|---|
com.couchbase.client.java.Bucket |
getBucket()
Provides access to the managed SDK
Bucket reference. |
com.couchbase.client.java.Cluster |
getCluster()
Provides access to the managed SDK
Cluster reference. |
com.couchbase.client.java.Collection |
getCollection(String name)
Provides access to a collection (identified by its name) in managed SDK
Scope reference. |
com.couchbase.client.java.Collection |
getDefaultCollection()
Provides access to the default collection.
|
PersistenceExceptionTranslator |
getExceptionTranslator()
The exception translator used on the factory.
|
com.couchbase.client.java.Scope |
getScope()
Provides access to the managed SDK
Scope reference. |
CouchbaseClientFactory |
withScope(String scopeName)
Returns a new
CouchbaseClientFactory set to the scope given as an argument. |
com.couchbase.client.java.Cluster getCluster()
Cluster
reference.com.couchbase.client.java.Bucket getBucket()
Bucket
reference.com.couchbase.client.java.Scope getScope()
Scope
reference.com.couchbase.client.java.Collection getCollection(String name)
Scope
reference.name
- the name of the collection. If null is passed in, the default collection is assumed.com.couchbase.client.java.Collection getDefaultCollection()
CouchbaseClientFactory withScope(String scopeName)
CouchbaseClientFactory
set to the scope given as an argument.scopeName
- the name of the scope to use for all collection access.PersistenceExceptionTranslator getExceptionTranslator()
Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.