Package com.couchbase.client.java
Class Bucket
- java.lang.Object
-
- com.couchbase.client.java.Bucket
-
public class Bucket extends Object
Provides access to a Couchbase bucket in a blocking fashion.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AsyncBucket
async()
Provides access to the underlyingAsyncBucket
.Collection
collection(String name)
Opens the collection with the given name for thisBucket
.CollectionManager
collections()
Core
core()
Provides access to the underlyingCore
.Collection
defaultCollection()
Opens the default collection for thisBucket
.Scope
defaultScope()
Opens the defaultScope
.ClusterEnvironment
environment()
Returns the attachedClusterEnvironment
.String
name()
Returns the name of theBucket
.PingResult
ping()
Performs a diagnostic active "ping" call on all services.PingResult
ping(PingOptions options)
Performs a diagnostic active "ping" call with custom options, on all services.ReactiveBucket
reactive()
Provides access to the relatedReactiveBucket
.Scope
scope(String name)
Opens theScope
with the given name.ViewIndexManager
viewIndexes()
ViewResult
viewQuery(String designDoc, String viewName)
ViewResult
viewQuery(String designDoc, String viewName, ViewOptions options)
-
-
-
Method Detail
-
async
public AsyncBucket async()
Provides access to the underlyingAsyncBucket
.
-
reactive
public ReactiveBucket reactive()
Provides access to the relatedReactiveBucket
.
-
environment
public ClusterEnvironment environment()
Returns the attachedClusterEnvironment
.
-
collections
@Volatile public CollectionManager collections()
-
viewIndexes
@Volatile public ViewIndexManager viewIndexes()
-
core
@Volatile public Core core()
Provides access to the underlyingCore
.This is advanced API, use with care!
-
scope
@Volatile public Scope scope(String name)
Opens theScope
with the given name.- Parameters:
name
- the name of the scope.- Returns:
- the
Scope
once opened.
-
defaultScope
@Volatile public Scope defaultScope()
Opens the defaultScope
.- Returns:
- the
Scope
once opened.
-
defaultCollection
public Collection defaultCollection()
Opens the default collection for thisBucket
.- Returns:
- the
Collection
once opened.
-
collection
@Volatile public Collection collection(String name)
Opens the collection with the given name for thisBucket
.- Returns:
- the
Collection
once opened.
-
viewQuery
public ViewResult viewQuery(String designDoc, String viewName)
-
viewQuery
public ViewResult viewQuery(String designDoc, String viewName, ViewOptions options)
-
ping
@Volatile public PingResult ping(PingOptions options)
Performs a diagnostic active "ping" call with custom options, on all services. Note that since each service has different timeouts, you need to provide a timeout that suits your needs (how long each individual service ping should take max before it times out).- Parameters:
options
- options controlling the final ping result- Returns:
- a ping report once created.
-
ping
@Volatile public PingResult ping()
Performs a diagnostic active "ping" call on all services. Note that since each service has different timeouts, you need to provide a timeout that suits your needs (how long each individual service ping should take max before it times out).- Returns:
- a ping report once created.
-
-