public class AsyncBucket extends Object
Modifier and Type | Method and Description |
---|---|
AsyncCollection |
collection(String collectionName)
Provides access to the collection with the given name for this
AsyncBucket using the default scope. |
AsyncCollectionManager |
collections() |
Core |
core()
Provides access to the underlying
Core . |
AsyncCollection |
defaultCollection()
Opens the default collection for this
AsyncBucket using the default scope. |
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
using the default scope.
This method does not block and the client will try to establish all needed resources in the background. If you
need to eagerly await until all resources are established before performing an operation, use the
waitUntilReady(Duration)
method on the AsyncBucket
.
AsyncCollection
.@Stability.Volatile public AsyncCollection collection(String collectionName)
AsyncBucket
using the default scope.
This method does not block and the client will try to establish all needed resources in the background. If you
need to eagerly await until all resources are established before performing an operation, use the
waitUntilReady(Duration)
method on the AsyncBucket
.
AsyncCollection
.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 © 2021 Couchbase, Inc.. All rights reserved.