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
-
-
-
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()
-
viewIndexes
@Volatile public AsyncViewIndexManager viewIndexes()
-
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)
-
ping
@Volatile public CompletableFuture<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 CompletableFuture<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.
-
-