Interface CouchbaseClientFactory

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:

public interface CouchbaseClientFactory extends Closeable
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 Details

    • getCluster getCluster()
      Provides access to the managed SDK Cluster reference.
    • getBucket getBucket()
      Provides access to the managed SDK Bucket reference.
    • getScope getScope()
      Provides access to the managed SDK Scope reference.
    • getCollection getCollection(String name)
      Provides access to a collection (identified by its name) in managed SDK Scope reference.
      name - the name of the collection. If null is passed in, the default collection is assumed.
    • getDefaultCollection getDefaultCollection()
      Provides access to the default collection.
    • withScope

      CouchbaseClientFactory withScope(String scopeName)
      Returns a new CouchbaseClientFactory set to the scope given as an argument.
      scopeName - the name of the scope to use for all collection access.
      a new client factory, bound to the other scope.
    • getExceptionTranslator

      PersistenceExceptionTranslator getExceptionTranslator()
      The exception translator used on the factory.