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
.Core
core()
Provides access to the underlyingCore
.Collection
defaultCollection()
Opens the default collection for thisBucket
.ClusterEnvironment
environment()
Returns the attachedClusterEnvironment
.String
name()
Returns the name of theBucket
.ReactiveBucket
reactive()
Provides access to the relatedReactiveBucket
.Scope
scope(String name)
Opens theScope
with the given name.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
.
-
core
@Uncommitted public Core core()
Provides access to the underlyingCore
.This is advanced API, use with care!
-
scope
public Scope scope(String name)
Opens theScope
with the given name.- Parameters:
name
- the name of the scope.- Returns:
- the
Scope
once opened.
-
defaultCollection
public Collection defaultCollection()
Opens the default collection for thisBucket
.- Returns:
- the
Collection
once opened.
-
collection
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)
-
-