public class AsyncBucket extends Object
Modifier and Type | Method and Description |
---|---|
AsyncCollection |
collection(String collectionName)
Opens the collection with the given name for this
AsyncBucket . |
AsyncCollectionManager |
collections() |
Core |
core()
Provides access to the underlying
Core . |
AsyncCollection |
defaultCollection()
Opens the default collection for this
AsyncBucket . |
AsyncScope |
defaultScope()
Opens the default
AsyncScope . |
ClusterEnvironment |
environment()
Returns the attached
ClusterEnvironment . |
String |
name()
Returns the name of the
AsyncBucket . |
CompletableFuture<PingResult> |
ping()
Performs application-level ping requests against services in the couchbase cluster.
|
CompletableFuture<PingResult> |
ping(PingOptions options)
Performs application-level ping requests with custom options against services in the couchbase cluster.
|
AsyncScope |
scope(String name)
Opens the
AsyncScope with the given name. |
AsyncViewIndexManager |
viewIndexes() |
CompletableFuture<ViewResult> |
viewQuery(String designDoc,
String viewName) |
CompletableFuture<ViewResult> |
viewQuery(String designDoc,
String viewName,
ViewOptions options) |
CompletableFuture<Void> |
waitUntilReady(Duration timeout)
Waits until the desired
ClusterState is reached. |
CompletableFuture<Void> |
waitUntilReady(Duration timeout,
WaitUntilReadyOptions options)
Waits until the desired
ClusterState is reached. |
public String name()
AsyncBucket
.public ClusterEnvironment environment()
ClusterEnvironment
.@Stability.Volatile public Core core()
Core
.
This is advanced API, use with care!
public AsyncCollectionManager collections()
public AsyncViewIndexManager viewIndexes()
@Stability.Volatile public AsyncScope scope(String name)
AsyncScope
with the given name.name
- the name of the scope.AsyncScope
once opened.@Stability.Volatile public AsyncScope defaultScope()
AsyncScope
.AsyncScope
once opened.public AsyncCollection defaultCollection()
AsyncBucket
.AsyncCollection
once opened.@Stability.Volatile public AsyncCollection collection(String collectionName)
AsyncBucket
.AsyncCollection
once opened.public CompletableFuture<ViewResult> viewQuery(String designDoc, String viewName)
public CompletableFuture<ViewResult> viewQuery(String designDoc, String viewName, ViewOptions options)
public CompletableFuture<PingResult> ping()
PingResult
once complete.public CompletableFuture<PingResult> ping(PingOptions options)
PingResult
once complete.public CompletableFuture<Void> waitUntilReady(Duration timeout)
ClusterState
is reached.
This method will wait until either the cluster state is "online", or the timeout is reached. Since the SDK is bootstrapping lazily, this method allows to eagerly check during bootstrap if all of the services are online and usable before moving on.
timeout
- the maximum time to wait until readiness.public CompletableFuture<Void> waitUntilReady(Duration timeout, WaitUntilReadyOptions options)
ClusterState
is reached.
This method will wait until either the cluster state is "online" by default, or the timeout is reached. Since the
SDK is bootstrapping lazily, this method allows to eagerly check during bootstrap if all of the services are online
and usable before moving on. You can tune the properties through WaitUntilReadyOptions
.
timeout
- the maximum time to wait until readiness.options
- the options to customize the readiness waiting.Copyright © 2020 Couchbase, Inc.. All rights reserved.