Packages

class AsyncCluster extends AnyRef

Represents a connection to a Couchbase cluster.

This is the asynchronous version of the Cluster API.

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

Since

1.0.0

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

Instance Constructors

  1. new AsyncCluster(environment: => ClusterEnvironment, authenticator: Authenticator, connectionString: ConnectionString)

    environment

    the environment used to create this

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. lazy val analyticsIndexes: AsyncAnalyticsIndexManager
  5. def analyticsQuery(statement: String, parameters: AnalyticsParameters = AnalyticsParameters.None, timeout: Duration = env.timeoutConfig.queryTimeout()): Future[AnalyticsResult]

    Performs an Analytics query against the cluster.

    Performs an Analytics query against the cluster.

    This is asynchronous. See Cluster.reactive for a reactive streaming 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 Future containing a Success(AnalyticsResult) (which includes any returned rows) if successful, else a Failure

  6. def analyticsQuery(statement: String, options: AnalyticsOptions): Future[AnalyticsResult]

    Performs an Analytics query against the cluster.

    Performs an Analytics query against the cluster.

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

    statement

    the Analytics query to execute

    options

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

    returns

    a Future containing a Success(AnalyticsResult) (which includes any returned rows) if successful, else a Failure

  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def bucket(bucketName: String): AsyncBucket

    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

  9. lazy val buckets: AsyncBucketManager

    The AsyncBucketManager provides access to creating and getting buckets.

  10. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  11. def diagnostics(options: DiagnosticsOptions): Future[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

  12. def diagnostics(reportId: String = UUID.randomUUID.toString): Future[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

  13. def disconnect(timeout: Duration = env.timeoutConfig.disconnectTimeout()): Future[Unit]

    Shutdown all cluster resources.

    Shutdown all cluster resources.

    This should be called before application exit.

    timeout

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

  14. val env: ClusterEnvironment

    The environment used to create this cluster

  15. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  17. lazy val eventingFunctions: AsyncEventingFunctionManager
    Annotations
    @Uncommitted()
  18. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  19. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  20. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  21. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  23. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  24. def ping(options: PingOptions): Future[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.

    options

    options to customize the ping

    returns

    the PingResult once complete.

  25. def ping(timeout: Option[Duration] = None): Future[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.

  26. def query(statement: String, parameters: QueryParameters = QueryParameters.None, timeout: Duration = env.timeoutConfig.queryTimeout(), adhoc: Boolean = true): Future[QueryResult]

    Performs a N1QL query against the cluster.

    Performs a N1QL query against the cluster.

    This is asynchronous. See Cluster.reactive for a reactive streaming 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.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 Future containing a Success(QueryResult) (which includes any returned rows) if successful, else a Failure

  27. def query(statement: String, options: QueryOptions): Future[QueryResult]

    Performs a N1QL query against the cluster.

    Performs a N1QL query against the cluster.

    This is asynchronous. See Cluster.reactive for a reactive streaming 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 Future containing a Success(QueryResult) (which includes any returned rows) if successful, else a Failure

  28. lazy val queryIndexes: AsyncQueryIndexManager
  29. def search(indexName: String, request: SearchRequest, options: SearchOptions): Future[SearchResult]

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

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

    This can be used to perform a traditional FTS query, and/or a vector search.

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

    indexName

    the name of the search index to use

    request

    the request to send to the FTS service.

    options

    see com.couchbase.client.scala.search.SearchOptions

    returns

    a Future containing a Success(SearchResult) (which includes any returned rows) if successful, else a Failure

  30. def search(indexName: String, request: SearchRequest): Future[SearchResult]

    Performs a Full Text Search (FTS) search against the cluster, using default options.

    Performs a Full Text Search (FTS) search against the cluster, using default options.

    This can be used to perform a traditional FTS query, and/or a vector search.

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

    indexName

    the name of the search index to use

    request

    the request to send to the FTS service.

    returns

    a Future containing a Success(SearchResult) (which includes any returned rows) if successful, else a Failure

  31. lazy val searchIndexes: AsyncSearchIndexManager
  32. def searchQuery(indexName: String, query: SearchQuery, timeout: Duration = environment.timeoutConfig.searchTimeout()): Future[SearchResult]

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

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

    This is asynchronous. See Cluster.reactive for a reactive streaming 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.

    New users should consider the newer search(String, SearchRequest) interface instead, which can do both the traditional FTS SearchQuery that this method performs, and/or can also be used to perform a com.couchbase.client.scala.search.vector.VectorSearch.

    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 Future containing a Success(SearchResult) (which includes any returned rows) if successful, else a Failure

  33. def searchQuery(indexName: String, query: SearchQuery, options: SearchOptions): Future[SearchResult]

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

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

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

    New users should consider the newer search(String, SearchRequest) interface instead, which can do both the traditional FTS SearchQuery that this method performs, and/or can also be used to perform a com.couchbase.client.scala.search.vector.VectorSearch.

    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

    see com.couchbase.client.scala.search.SearchOptions

    returns

    a Future containing a Success(SearchResult) (which includes any returned rows) if successful, else a Failure

  34. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  35. def toString(): String
    Definition Classes
    AnyRef → Any
  36. lazy val transactions: AsyncTransactions
  37. lazy val users: AsyncUserManager

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

  38. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  39. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  40. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  41. def waitUntilReady(timeout: Duration, options: WaitUntilReadyOptions): Future[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

  42. def waitUntilReady(timeout: Duration): Future[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.

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped