Packages

class ReactiveCluster extends AnyRef

Represents a connection to a Couchbase cluster.

This is the reactive version of the Cluster API.

These can be created through the functions in the companion object, or through Cluster.reactive.

Since

1.0.0

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ReactiveCluster
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ReactiveCluster(async: AsyncCluster)

    async

    an asynchronous version of this API

Value Members

  1. lazy val analyticsIndexes: ReactiveAnalyticsIndexManager
    Annotations
    @Volatile()
  2. def analyticsQuery(statement: String, parameters: AnalyticsParameters = AnalyticsParameters.None, timeout: Duration = env.timeoutConfig.queryTimeout()): SMono[ReactiveAnalyticsResult]

    Performs an Analytics query against the cluster.

    Performs an Analytics query against the cluster.

    This is a reactive API. See Cluster.async for an asynchronous version of this API, and Cluster for a blocking version.

    statement

    the Analytics query to execute

    parameters

    provides named or positional parameters for queries parameterised that way.

    timeout

    sets a maximum timeout for processing.

    returns

    a Mono containing a analytics.ReactiveAnalyticsResult which includes a Flux giving streaming access to any returned rows

  3. def analyticsQuery(statement: String, options: AnalyticsOptions): SMono[ReactiveAnalyticsResult]

    Performs an Analytics query against the cluster.

    Performs an Analytics query against the cluster.

    This is a reactive API. See Cluster.async for an asynchronous version of this API, and Cluster for a blocking version.

    statement

    the Analytics query to execute

    options

    any query options - see analytics.AnalyticsOptions for documentation

    returns

    a Mono containing a analytics.ReactiveAnalyticsResult which includes a Flux giving streaming access to any returned rows

  4. val async: AsyncCluster
  5. def bucket(bucketName: String): ReactiveBucket

    Opens and returns a Couchbase bucket resource that exists on this cluster.

    Opens and returns a Couchbase bucket resource that exists on this cluster.

    bucketName

    the name of the bucket to open

  6. lazy val buckets: ReactiveBucketManager

    The ReactiveBucketManager provides access to creating and getting buckets.

    The ReactiveBucketManager provides access to creating and getting buckets.

    Annotations
    @Volatile()
  7. def diagnostics(options: DiagnosticsOptions): SMono[DiagnosticsResult]

    Returns a DiagnosticsResult, reflecting the SDK's current view of all its existing connections to the cluster.

    Returns a DiagnosticsResult, reflecting the SDK's current view of all its existing connections to the cluster.

    options

    options to customize the report generation

    returns

    a DiagnosticsResult

  8. def diagnostics(reportId: String = UUID.randomUUID.toString): SMono[DiagnosticsResult]

    Returns a DiagnosticsResult, reflecting the SDK's current view of all its existing connections to the cluster.

    Returns a DiagnosticsResult, reflecting the SDK's current view of all its existing connections to the cluster.

    reportId

    this will be returned in the DiagnosticsResult. If not specified it defaults to a UUID.

    returns

    a DiagnosticsResult

  9. def disconnect(timeout: Duration = ...): SMono[Unit]

    Shutdown all cluster resources.search

    Shutdown all cluster resources.search

    This should be called before application exit.

    timeout

    how long the disconnect is allowed to take; defaults to disconnectTimeout on the environment

  10. val env: ClusterEnvironment

    The environment used to create this cluster

  11. def ping(options: PingOptions): SMono[PingResult]

    Performs application-level ping requests with custom options against services in the Couchbase cluster.

    Performs application-level ping requests with custom options against services in the Couchbase cluster.

    Note that this operation performs active I/O against services and endpoints to assess their health. If you do not wish to perform I/O, consider using the .diagnostics() instead.

    options

    options to customize the ping

    returns

    the PingResult once complete.

  12. def ping(timeout: Option[Duration] = None): SMono[PingResult]

    Performs application-level ping requests with custom options against services in the Couchbase cluster.

    Performs application-level ping requests with custom options against services in the Couchbase cluster.

    Note that this operation performs active I/O against services and endpoints to assess their health. If you do not wish to perform I/O, consider using .diagnostics() instead.

    This overload provides only the most commonly used options. If you need to configure something more esoteric, use the overload that takes a com.couchbase.client.scala.diagnostics.PingOptions instead, which supports all available options.

    timeout

    the timeout to use for the operation

    returns

    the PingResult once complete.

  13. def query(statement: String, parameters: QueryParameters = QueryParameters.None, timeout: Duration = env.timeoutConfig.queryTimeout(), adhoc: Boolean = true): SMono[ReactiveQueryResult]

    Performs a N1QL query against the cluster.

    Performs a N1QL query against the cluster.

    This is blocking. See Cluster.reactive for a reactive streaming version of this API, and Cluster.async for an asynchronous version.

    This overload provides only the most commonly used options. If you need to configure something more esoteric, use the overload that takes a com.couchbase.client.scala.query.QueryOptions instead, which supports all available options.

    statement

    the N1QL statement to execute

    parameters

    provides named or positional parameters for queries parameterised that way.

    timeout

    sets a maximum timeout for processing.

    adhoc

    if true (the default), adhoc mode is enabled: queries are just run. If false, adhoc mode is disabled and transparent prepared statement mode is enabled: queries are first prepared so they can be executed more efficiently in the future.

    returns

    a Mono containing a com.couchbase.client.scala.query.ReactiveQueryResult which includes a Flux giving streaming access to any returned rows

  14. def query(statement: String, options: QueryOptions): SMono[ReactiveQueryResult]

    Performs a N1QL query against the cluster.

    Performs a N1QL query against the cluster.

    This is a reactive API. See Cluster.async for an asynchronous version of this API, and Cluster for a blocking version.

    statement

    the N1QL statement to execute

    options

    any query options - see com.couchbase.client.scala.query.QueryOptions for documentation

    returns

    a Mono containing a com.couchbase.client.scala.query.ReactiveQueryResult which includes a Flux giving streaming access to any returned rows

  15. lazy val queryIndexes: ReactiveQueryIndexManager

    The ReactiveQueryIndexManager provides access to creating and managing query indexes.

    The ReactiveQueryIndexManager provides access to creating and managing query indexes.

    Annotations
    @Volatile()
  16. lazy val searchIndexes: ReactiveSearchIndexManager
    Annotations
    @Volatile()
  17. def searchQuery(indexName: String, query: SearchQuery, timeout: Duration = ...): SMono[ReactiveSearchResult]

    Performs a Full Text Search (FTS) query against the cluster.

    Performs a Full Text Search (FTS) query against the cluster.

    This is a reactive API. See Cluster.async for an asynchronous version of this API, and Cluster for a blocking version.

    This overload provides only the most commonly used options. If you need to configure something more esoteric, use the overload that takes a com.couchbase.client.scala.search.SearchOptions instead, which supports all available options.

    indexName

    the name of the search index to use

    query

    the FTS query to execute. See com.couchbase.client.scala.search.queries.SearchQuery for more

    timeout

    how long the operation is allowed to take

    returns

    a Mono containing a search.result.ReactiveSearchResult which includes a Flux giving streaming access to any returned rows

  18. def searchQuery(indexName: String, query: SearchQuery, options: SearchOptions): SMono[ReactiveSearchResult]

    Performs a Full Text Search (FTS) query against the cluster.

    Performs a Full Text Search (FTS) query against the cluster.

    This is a reactive API. See Cluster.async for an asynchronous version of this API, and Cluster for a blocking version.

    indexName

    the name of the search index to use

    query

    the FTS query to execute. See com.couchbase.client.scala.search.queries.SearchQuery for more

    options

    the FTS query to execute. See com.couchbase.client.scala.search.SearchOptions for how to construct

    returns

    a Mono containing a search.result.ReactiveSearchResult which includes a Flux giving streaming access to any returned rows

  19. lazy val users: ReactiveUserManager

    The ReactiveUserManager provides programmatic access to and creation of users and groups.

    The ReactiveUserManager provides programmatic access to and creation of users and groups.

    Annotations
    @Volatile()
  20. def waitUntilReady(timeout: Duration, options: WaitUntilReadyOptions): SMono[Unit]

    Waits until the desired ClusterState is reached.

    Waits until the desired 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.

    options

    options to customize the wait

  21. def waitUntilReady(timeout: Duration): SMono[Unit]

    Waits until the desired ClusterState is reached.

    Waits until the desired 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.

    This overload provides only the most commonly used options. If you need to configure something more esoteric, use the overload that takes a com.couchbase.client.scala.diagnostics.WaitUntilReadyOptions instead, which supports all available options.

    timeout

    the maximum time to wait until readiness.