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
.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
.
-
collections
@Volatile public CollectionManager collections()
-
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)
-
-