Package com.couchbase.client.java
Class AsyncBucket
- java.lang.Object
-
- com.couchbase.client.java.AsyncBucket
-
public class AsyncBucket extends Object
Provides access to a Couchbase bucket in an async fashion.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletableFuture<AsyncCollection>
collection(String collection)
Opens the collection with the given name for thisAsyncBucket
.AsyncCollectionManager
collections()
Core
core()
Provides access to the underlyingCore
.CompletableFuture<AsyncCollection>
defaultCollection()
Opens the default collection for thisAsyncBucket
.CompletableFuture<AsyncScope>
defaultScope()
Opens the defaultAsyncScope
.ClusterEnvironment
environment()
Returns the attachedClusterEnvironment
.String
name()
Returns the name of theAsyncBucket
.CompletableFuture<AsyncScope>
scope(String name)
Opens theAsyncScope
with the given name.CompletableFuture<ViewResult>
viewQuery(String designDoc, String viewName)
CompletableFuture<ViewResult>
viewQuery(String designDoc, String viewName, ViewOptions options)
-
-
-
Method Detail
-
name
public String name()
Returns the name of theAsyncBucket
.
-
environment
public ClusterEnvironment environment()
Returns the attachedClusterEnvironment
.
-
core
@Volatile public Core core()
Provides access to the underlyingCore
.This is advanced API, use with care!
-
collections
@Volatile public AsyncCollectionManager collections()
-
scope
@Volatile public CompletableFuture<AsyncScope> scope(String name)
Opens theAsyncScope
with the given name.- Parameters:
name
- the name of the scope.- Returns:
- the
AsyncScope
once opened.
-
defaultScope
@Volatile public CompletableFuture<AsyncScope> defaultScope()
Opens the defaultAsyncScope
.- Returns:
- the
AsyncScope
once opened.
-
defaultCollection
public CompletableFuture<AsyncCollection> defaultCollection()
Opens the default collection for thisAsyncBucket
.- Returns:
- the
AsyncCollection
once opened.
-
collection
@Volatile public CompletableFuture<AsyncCollection> collection(String collection)
Opens the collection with the given name for thisAsyncBucket
.- Returns:
- the
AsyncCollection
once opened.
-
viewQuery
public CompletableFuture<ViewResult> viewQuery(String designDoc, String viewName)
-
viewQuery
public CompletableFuture<ViewResult> viewQuery(String designDoc, String viewName, ViewOptions options)
-
-