Packages

c

com.couchbase.client.scala

ReactiveCollection

class ReactiveCollection extends AnyRef

Provides asynchronous access to all collection APIs, based around reactive programming using the Project Reactor library. This is the main entry-point for key-value (KV) operations.

If synchronous, blocking access is needed, we recommend looking at the Collection. If a simpler async API based around Scala Futures is desired, then check out the AsyncCollection.

Since

1.0.0

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

Instance Constructors

  1. new ReactiveCollection(async: AsyncCollection)

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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def bucketName: String
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  9. def exists(id: String, options: ExistsOptions): SMono[ExistsResult]

    Checks if a document exists.

    Checks if a document exists.

    This reactive programming version performs the same functionality and takes the same parameters, but returns the same result object asynchronously in a Project Reactor SMono. See the documentation for the matching method in Collection.

  10. def exists(id: String, timeout: Duration = kvReadTimeout): SMono[ExistsResult]

    Checks if a document exists.

    Checks if a document exists.

    This reactive programming version performs the same functionality and takes the same parameters, but returns the same result object asynchronously in a Project Reactor SMono. See the documentation for the matching method in Collection.

  11. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  12. def get(id: String, options: GetOptions): SMono[GetResult]

    Fetches a full document from this collection.

    Fetches a full document from this collection.

    This reactive programming version performs the same functionality and takes the same parameters, but returns the same result object asynchronously in a Project Reactor SMono. See the documentation for the matching method in Collection.

  13. def get(id: String, timeout: Duration = kvReadTimeout): SMono[GetResult]

    Fetches a full document from this collection.

    Fetches a full document from this collection.

    This reactive programming version performs the same functionality and takes the same parameters, but returns the same result object asynchronously in a Project Reactor SMono. See the documentation for the matching method in Collection.

  14. def getAllReplicas(id: String, options: GetAllReplicasOptions): SFlux[GetReplicaResult]

    Retrieves all available versions of the document.

    Retrieves all available versions of the document.

    This reactive programming version performs the same functionality and takes the same parameters, but returns the same result object asynchronously in a Project Reactor SMono. See the documentation for the matching method in Collection.

  15. def getAllReplicas(id: String, timeout: Duration = kvReadTimeout): SFlux[GetReplicaResult]

    Retrieves all available versions of the document.

    Retrieves all available versions of the document.

    This reactive programming version performs the same functionality and takes the same parameters, but returns the same result object asynchronously in a Project Reactor SMono. See the documentation for the matching method in Collection.

  16. def getAndLock(id: String, lockTime: Duration, options: GetAndLockOptions): SMono[GetResult]

    Fetches a full document from this collection, and simultaneously lock the document from writes.

    Fetches a full document from this collection, and simultaneously lock the document from writes.

    This reactive programming version performs the same functionality and takes the same parameters, but returns the same result object asynchronously in a Project Reactor SMono. See the documentation for the matching method in Collection.

  17. def getAndLock(id: String, lockTime: Duration, timeout: Duration = kvReadTimeout): SMono[GetResult]

    Fetches a full document from this collection, and simultaneously lock the document from writes.

    Fetches a full document from this collection, and simultaneously lock the document from writes.

    This reactive programming version performs the same functionality and takes the same parameters, but returns the same result object asynchronously in a Project Reactor SMono. See the documentation for the matching method in Collection.

  18. def getAndTouch(id: String, expiry: Duration, options: GetAndTouchOptions): SMono[GetResult]

    Fetches a full document from this collection, and simultaneously update the expiry value of the document.

    Fetches a full document from this collection, and simultaneously update the expiry value of the document.

    This reactive programming version performs the same functionality and takes the same parameters, but returns the same result object asynchronously in a Project Reactor SMono. See the documentation for the matching method in Collection.

  19. def getAndTouch(id: String, expiry: Duration, timeout: Duration = kvReadTimeout): SMono[GetResult]

    Fetches a full document from this collection, and simultaneously update the expiry value of the document.

    Fetches a full document from this collection, and simultaneously update the expiry value of the document.

    This reactive programming version performs the same functionality and takes the same parameters, but returns the same result object asynchronously in a Project Reactor SMono. See the documentation for the matching method in Collection.

  20. def getAnyReplica(id: String, options: GetAnyReplicaOptions): SMono[GetReplicaResult]

    Retrieves any available version of the document.

    Retrieves any available version of the document.

    This reactive programming version performs the same functionality and takes the same parameters, but returns the same result object asynchronously in a Project Reactor SMono. See the documentation for the matching method in Collection.

  21. def getAnyReplica(id: String, timeout: Duration = kvReadTimeout): SMono[GetReplicaResult]

    Retrieves any available version of the document.

    Retrieves any available version of the document.

    This reactive programming version performs the same functionality and takes the same parameters, but returns the same result object asynchronously in a Project Reactor SMono. See the documentation for the matching method in Collection.

  22. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  23. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  24. def insert[T](id: String, content: T, options: InsertOptions)(implicit serializer: JsonSerializer[T]): SMono[MutationResult]

    Inserts a full document into this collection, if it does not exist already.

    Inserts a full document into this collection, if it does not exist already.

    This reactive programming version performs the same functionality and takes the same parameters, but returns the same result object asynchronously in a Project Reactor SMono. See the documentation for the matching method in Collection.

  25. def insert[T](id: String, content: T, durability: Durability = Disabled, timeout: Duration = Duration.MinusInf)(implicit serializer: JsonSerializer[T]): SMono[MutationResult]

    Inserts a full document into this collection, if it does not exist already.

    Inserts a full document into this collection, if it does not exist already.

    This reactive programming version performs the same functionality and takes the same parameters, but returns the same result object asynchronously in a Project Reactor SMono. See the documentation for the matching method in Collection.

  26. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  27. def lookupIn(id: String, spec: Seq[LookupInSpec], options: LookupInOptions): SMono[LookupInResult]

    SubDocument lookups allow retrieving parts of a JSON document directly, which may be more efficient than retrieving the entire document.

    SubDocument lookups allow retrieving parts of a JSON document directly, which may be more efficient than retrieving the entire document.

    This reactive programming version performs the same functionality and takes the same parameters, but returns the same result object asynchronously in a Project Reactor SMono. See the documentation for the matching method in Collection.

  28. def lookupIn(id: String, spec: Seq[LookupInSpec], timeout: Duration = kvReadTimeout): SMono[LookupInResult]

    SubDocument lookups allow retrieving parts of a JSON document directly, which may be more efficient than retrieving the entire document.

    SubDocument lookups allow retrieving parts of a JSON document directly, which may be more efficient than retrieving the entire document.

    This reactive programming version performs the same functionality and takes the same parameters, but returns the same result object asynchronously in a Project Reactor SMono. See the documentation for the matching method in Collection.

  29. def lookupInAllReplicas(id: String, spec: Seq[LookupInSpec], options: LookupInAllReplicasOptions): SFlux[LookupInReplicaResult]

    SubDocument lookups allow retrieving parts of a JSON document directly, which may be more efficient than retrieving the entire document.

    SubDocument lookups allow retrieving parts of a JSON document directly, which may be more efficient than retrieving the entire document.

    Individual operations can succeed or fail without affecting the others. See kv.LookupInReplicaResult for details on how to process the results.

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

    This variant will read and return all replicas of the document.

    This reactive programming version performs the same functionality and takes the same parameters, but returns the same result object asynchronously in a Project Reactor SMono. See the documentation for the matching method in Collection.

    Annotations
    @SinceCouchbase()
  30. def lookupInAllReplicas(id: String, spec: Seq[LookupInSpec], timeout: Duration = kvReadTimeout): SFlux[LookupInReplicaResult]

    SubDocument lookups allow retrieving parts of a JSON document directly, which may be more efficient than retrieving the entire document.

    SubDocument lookups allow retrieving parts of a JSON document directly, which may be more efficient than retrieving the entire document.

    Individual operations can succeed or fail without affecting the others. See kv.LookupInReplicaResult for details on how to process the results.

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

    This variant will read and return all replicas of the document.

    This reactive programming version performs the same functionality and takes the same parameters, but returns the same result object asynchronously in a Project Reactor SMono. See the documentation for the matching method in Collection.

    Annotations
    @SinceCouchbase()
  31. def lookupInAnyReplica(id: String, spec: Seq[LookupInSpec], options: LookupInAnyReplicaOptions): SMono[LookupInReplicaResult]

    SubDocument lookups allow retrieving parts of a JSON document directly, which may be more efficient than retrieving the entire document.

    SubDocument lookups allow retrieving parts of a JSON document directly, which may be more efficient than retrieving the entire document.

    Individual operations can succeed or fail without affecting the others. See kv.LookupInReplicaResult for details on how to process the results.

    This variant will read all replicas of the document, and return the first one found.

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

    This reactive programming version performs the same functionality and takes the same parameters, but returns the same result object asynchronously in a Project Reactor SMono. See the documentation for the matching method in Collection.

    Annotations
    @SinceCouchbase()
  32. def lookupInAnyReplica(id: String, spec: Seq[LookupInSpec], timeout: Duration = kvReadTimeout): SMono[LookupInReplicaResult]

    SubDocument lookups allow retrieving parts of a JSON document directly, which may be more efficient than retrieving the entire document.

    SubDocument lookups allow retrieving parts of a JSON document directly, which may be more efficient than retrieving the entire document.

    Individual operations can succeed or fail without affecting the others. See kv.LookupInReplicaResult for details on how to process the results.

    This variant will read all replicas of the document, and return the first one found.

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

    This reactive programming version performs the same functionality and takes the same parameters, but returns the same result object asynchronously in a Project Reactor SMono. See the documentation for the matching method in Collection.

    Annotations
    @SinceCouchbase()
  33. def mutateIn(id: String, spec: Seq[MutateInSpec], options: MutateInOptions): SMono[MutateInResult]

    SubDocument mutations allow modifying parts of a JSON document directly, which can be more efficiently than fetching and modifying the full document.

    SubDocument mutations allow modifying parts of a JSON document directly, which can be more efficiently than fetching and modifying the full document.

    This reactive programming version performs the same functionality and takes the same parameters, but returns the same result object asynchronously in a Project Reactor SMono. See the documentation for the matching method in Collection.

  34. def mutateIn(id: String, spec: Seq[MutateInSpec], cas: Long = 0, document: StoreSemantics = StoreSemantics.Replace, durability: Durability = Disabled, timeout: Duration = Duration.MinusInf): SMono[MutateInResult]

    SubDocument mutations allow modifying parts of a JSON document directly, which can be more efficiently than fetching and modifying the full document.

    SubDocument mutations allow modifying parts of a JSON document directly, which can be more efficiently than fetching and modifying the full document.

    This reactive programming version performs the same functionality and takes the same parameters, but returns the same result object asynchronously in a Project Reactor SMono. See the documentation for the matching method in Collection.

  35. def name: String
  36. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  37. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  38. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  39. lazy val queryIndexes: ReactiveCollectionQueryIndexManager

    Manage query indexes for this collection

  40. def remove(id: String, options: RemoveOptions): SMono[MutationResult]

    Removes a document from this collection, if it exists.

    Removes a document from this collection, if it exists.

    This reactive programming version performs the same functionality and takes the same parameters, but returns the same result object asynchronously in a Project Reactor SMono. See the documentation for the matching method in Collection.

  41. def remove(id: String, cas: Long = 0, durability: Durability = Disabled, timeout: Duration = Duration.MinusInf): SMono[MutationResult]

    Removes a document from this collection, if it exists.

    Removes a document from this collection, if it exists.

    This reactive programming version performs the same functionality and takes the same parameters, but returns the same result object asynchronously in a Project Reactor SMono. See the documentation for the matching method in Collection.

  42. def replace[T](id: String, content: T, options: ReplaceOptions)(implicit serializer: JsonSerializer[T]): SMono[MutationResult]

    Replaces the contents of a full document in this collection, if it already exists.

    Replaces the contents of a full document in this collection, if it already exists.

    This reactive programming version performs the same functionality and takes the same parameters, but returns the same result object asynchronously in a Project Reactor SMono. See the documentation for the matching method in Collection.

  43. def replace[T](id: String, content: T, cas: Long = 0, durability: Durability = Disabled, timeout: Duration = Duration.MinusInf)(implicit serializer: JsonSerializer[T]): SMono[MutationResult]

    Replaces the contents of a full document in this collection, if it already exists.

    Replaces the contents of a full document in this collection, if it already exists.

    This reactive programming version performs the same functionality and takes the same parameters, but returns the same result object asynchronously in a Project Reactor SMono. See the documentation for the matching method in Collection.

  44. def scan(scanType: ScanType, opts: ScanOptions): SFlux[ScanResult]

    Initiates a KV range scan, which will return a stream of KV documents.

    Initiates a KV range scan, which will return a stream of KV documents.

    CAVEAT:This method is suitable for use cases that require relatively low concurrency and tolerate relatively high latency. If your application does many scans at once, or requires low latency results, we recommend using SQL++ (with a primary index on the collection) instead.

    Annotations
    @SinceCouchbase()
  45. def scan(scanType: ScanType): SFlux[ScanResult]

    Initiates a KV range scan, which will return a stream of KV documents.

    Initiates a KV range scan, which will return a stream of KV documents.

    Uses default options.

    CAVEAT:This method is suitable for use cases that require relatively low concurrency and tolerate relatively high latency. If your application does many scans at once, or requires low latency results, we recommend using SQL++ (with a primary index on the collection) instead.

    Annotations
    @SinceCouchbase()
  46. def scopeName: String
  47. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  48. def toString(): String
    Definition Classes
    AnyRef → Any
  49. def touch(id: String, expiry: Duration, options: TouchOptions): SMono[MutationResult]

    Updates the expiry of the document with the given id.

    Updates the expiry of the document with the given id.

    This reactive programming version performs the same functionality and takes the same parameters, but returns the same result object asynchronously in a Project Reactor SMono. See the documentation for the matching method in Collection.

  50. def touch(id: String, expiry: Duration, timeout: Duration = kvReadTimeout): SMono[MutationResult]

    Updates the expiry of the document with the given id.

    Updates the expiry of the document with the given id.

    This reactive programming version performs the same functionality and takes the same parameters, but returns the same result object asynchronously in a Project Reactor SMono. See the documentation for the matching method in Collection.

  51. def unlock(id: String, cas: Long, options: UnlockOptions): SMono[Unit]

    Unlock a locked document.

    Unlock a locked document.

    This reactive programming version performs the same functionality and takes the same parameters, but returns the same result object asynchronously in a Project Reactor SMono. See the documentation for the matching method in Collection.

  52. def unlock(id: String, cas: Long, timeout: Duration = kvReadTimeout): SMono[Unit]

    Unlock a locked document.

    Unlock a locked document.

    This reactive programming version performs the same functionality and takes the same parameters, but returns the same result object asynchronously in a Project Reactor SMono. See the documentation for the matching method in Collection.

  53. def upsert[T](id: String, content: T, options: UpsertOptions)(implicit serializer: JsonSerializer[T]): SMono[MutationResult]

    Upserts the contents of a full document in this collection.

    Upserts the contents of a full document in this collection.

    This reactive programming version performs the same functionality and takes the same parameters, but returns the same result object asynchronously in a Project Reactor SMono. See the documentation for the matching method in Collection.

  54. def upsert[T](id: String, content: T, durability: Durability = Disabled, timeout: Duration = Duration.MinusInf)(implicit serializer: JsonSerializer[T]): SMono[MutationResult]

    Upserts the contents of a full document in this collection.

    Upserts the contents of a full document in this collection.

    This reactive programming version performs the same functionality and takes the same parameters, but returns the same result object asynchronously in a Project Reactor SMono. See the documentation for the matching method in Collection.

  55. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  56. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  57. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped