Package com.couchbase.client.java
Class ReactiveCluster
- java.lang.Object
-
- com.couchbase.client.java.ReactiveCluster
-
public class ReactiveCluster extends Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ReactiveAnalyticsIndexManager
analyticsIndexes()
Provides access to the Analytics index management services.Mono<ReactiveAnalyticsResult>
analyticsQuery(String statement)
Performs an Analytics query with defaultAnalyticsOptions
.Mono<ReactiveAnalyticsResult>
analyticsQuery(String statement, AnalyticsOptions options)
Performs an Analytics query with customAnalyticsOptions
.AsyncCluster
async()
Provides access to the underlyingAsyncCluster
.Mono<ReactiveBucket>
bucket(String name)
Opens aReactiveBucket
with the given name.ReactiveBucketManager
buckets()
Provides access to the bucket management services.static Mono<ReactiveCluster>
connect(String connectionString, ClusterOptions options)
Connect to a Couchbase cluster with customAuthenticator
.static Mono<ReactiveCluster>
connect(String connectionString, String username, String password)
Connect to a Couchbase cluster with a username and a password as credentials.Core
core()
Provides access to the underlyingCore
.Mono<Void>
disconnect()
Performs a non-reversible disconnect of thisReactiveCluster
.Mono<Void>
disconnect(Duration timeout)
Performs a non-reversible disconnect of thisReactiveCluster
.ClusterEnvironment
environment()
Provides access to the configuredClusterEnvironment
for this cluster.Mono<ReactiveQueryResult>
query(String statement)
Performs a N1QL query with defaultQueryOptions
.Mono<ReactiveQueryResult>
query(String statement, QueryOptions options)
Performs a N1QL query with customQueryOptions
.ReactiveQueryIndexManager
queryIndexes()
Provides access to the N1QL index management services.Mono<ReactiveSearchResult>
searchQuery(String indexName, SearchQuery query)
Performs a Full Text Search (FTS) query with defaultSearchOptions
.Mono<ReactiveSearchResult>
searchQuery(String indexName, SearchQuery query, SearchOptions options)
Performs a Full Text Search (FTS) query with customSearchOptions
.ReactiveUserManager
users()
Provides access to the user management services.
-
-
-
Method Detail
-
connect
public static Mono<ReactiveCluster> connect(String connectionString, String username, String password)
Connect to a Couchbase cluster with a username and a password as credentials.- Parameters:
connectionString
- connection string used to locate the Couchbase cluster.username
- the name of the user with appropriate permissions on the cluster.password
- the password of the user with appropriate permissions on the cluster.- Returns:
- if properly connected, returns a
ReactiveCluster
.
-
connect
public static Mono<ReactiveCluster> connect(String connectionString, ClusterOptions options)
Connect to a Couchbase cluster with customAuthenticator
.- Parameters:
connectionString
- connection string used to locate the Couchbase cluster.options
- custom options when creating the cluster.- Returns:
- if properly connected, returns a
ReactiveCluster
.
-
core
@Volatile public Core core()
Provides access to the underlyingCore
.This is advanced API, use with care!
-
users
@Volatile public ReactiveUserManager users()
Provides access to the user management services.
-
buckets
@Volatile public ReactiveBucketManager buckets()
Provides access to the bucket management services.
-
analyticsIndexes
@Volatile public ReactiveAnalyticsIndexManager analyticsIndexes()
Provides access to the Analytics index management services.
-
queryIndexes
@Volatile public ReactiveQueryIndexManager queryIndexes()
Provides access to the N1QL index management services.
-
async
public AsyncCluster async()
Provides access to the underlyingAsyncCluster
.
-
environment
public ClusterEnvironment environment()
Provides access to the configuredClusterEnvironment
for this cluster.
-
query
public Mono<ReactiveQueryResult> query(String statement)
Performs a N1QL query with defaultQueryOptions
.- Parameters:
statement
- the N1QL query statement as a raw string.- Returns:
- the
ReactiveQueryResult
once the response arrives successfully.
-
query
public Mono<ReactiveQueryResult> query(String statement, QueryOptions options)
Performs a N1QL query with customQueryOptions
.- Parameters:
statement
- the N1QL query statement as a raw string.options
- the custom options for this query.- Returns:
- the
ReactiveQueryResult
once the response arrives successfully.
-
analyticsQuery
public Mono<ReactiveAnalyticsResult> analyticsQuery(String statement)
Performs an Analytics query with defaultAnalyticsOptions
.- Parameters:
statement
- the Analytics query statement as a raw string.- Returns:
- the
ReactiveAnalyticsResult
once the response arrives successfully.
-
analyticsQuery
public Mono<ReactiveAnalyticsResult> analyticsQuery(String statement, AnalyticsOptions options)
Performs an Analytics query with customAnalyticsOptions
.- Parameters:
statement
- the Analytics query statement as a raw string.options
- the custom options for this analytics query.- Returns:
- the
ReactiveAnalyticsResult
once the response arrives successfully.
-
searchQuery
public Mono<ReactiveSearchResult> searchQuery(String indexName, SearchQuery query)
Performs a Full Text Search (FTS) query with defaultSearchOptions
.- Parameters:
query
- the query, in the form of aSearchQuery
- Returns:
- the
SearchRequest
once the response arrives successfully, inside aMono
-
searchQuery
public Mono<ReactiveSearchResult> searchQuery(String indexName, SearchQuery query, SearchOptions options)
Performs a Full Text Search (FTS) query with customSearchOptions
.- Parameters:
query
- the query, in the form of aSearchQuery
options
- the custom options for this query.- Returns:
- the
SearchRequest
once the response arrives successfully, inside aMono
-
bucket
public Mono<ReactiveBucket> bucket(String name)
Opens aReactiveBucket
with the given name.- Parameters:
name
- the name of the bucket to open.- Returns:
- a
ReactiveBucket
once opened.
-
disconnect
public Mono<Void> disconnect()
Performs a non-reversible disconnect of thisReactiveCluster
.
-
disconnect
public Mono<Void> disconnect(Duration timeout)
Performs a non-reversible disconnect of thisReactiveCluster
.- Parameters:
timeout
- overriding the default disconnect timeout if needed.
-
-