Packages

c

com.couchbase.client.scala

BinaryCollection

class BinaryCollection extends AnyRef

Operations on non-JSON Couchbase documents.

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

Instance Constructors

  1. new BinaryCollection(async: AsyncBinaryCollection)

    async

    an asynchronous version of this API

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. def append(id: String, content: Array[Byte], options: AppendOptions): Try[MutationResult]

    Add bytes to the end of a Couchbase binary document.

    Add bytes to the end of a Couchbase binary document.

    this method should not be used with JSON documents. This operates at the byte level and is unsuitable for dealing with JSON documents. Use this method only when explicitly dealing with binary or UTF-8 documents. It may invalidate an existing JSON document.

    id

    the unique identifier of the document

    content

    the bytes to append

    options

    configure options that affect this operation

    returns

    on success, a Success(MutationResult), else a Failure(CouchbaseException). This could be com.couchbase.client.core.error.DocumentDoesNotExistException, indicating the document could not be found. any scala.util.control.NonFatal error returned will derive ultimately from com.couchbase.client.core.error.CouchbaseException. See the error handling docs for more detail.

  5. def append(id: String, content: Array[Byte], cas: Long = 0, durability: Durability = Disabled, timeout: Duration = Duration.MinusInf): Try[MutationResult]

    Add bytes to the end of a Couchbase binary document.

    Add bytes to the end of a Couchbase binary document.

    this method should not be used with JSON documents. This operates at the byte level and is unsuitable for dealing with JSON documents. Use this method only when explicitly dealing with binary or UTF-8 documents. It may invalidate an existing JSON document.

    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.AppendOptions instead, which supports all available options.

    id

    the unique identifier of the document

    content

    the bytes to append

    cas

    Couchbase documents all have a CAS (Compare-And-Set) field, a simple integer that allows optimistic concurrency - e.g. it can detect if another agent has modified a document in-between this agent getting and modifying the document. See these JSON docs for a full description. The default is 0, which disables CAS checking.

    durability

    writes in Couchbase are written to a single node, and from there the Couchbase Server will take care of sending that mutation to any configured replicas. This parameter provides some control over ensuring the success of the mutation's replication. See com.couchbase.client.scala.durability.Durability for a detailed discussion.

    timeout

    when the operation will timeout. This will default to timeoutConfig().kvTimeout() in the provided com.couchbase.client.scala.env.ClusterEnvironment.

    returns

    on success, a Success(MutationResult), else a Failure(CouchbaseException). This could be com.couchbase.client.core.error.DocumentDoesNotExistException, indicating the document could not be found. any scala.util.control.NonFatal error returned will derive ultimately from com.couchbase.client.core.error.CouchbaseException. See the error handling docs for more detail.

  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. val async: AsyncBinaryCollection
  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  9. def decrement(id: String, delta: Long, options: DecrementOptions): Try[CounterResult]

    Decrement a Couchbase 'counter' document.

    Decrement a Couchbase 'counter' document. though it is common to use Couchbase to store exclusively JSON, Couchbase is actually agnostic to what is stored. It is possible to use a document as a 'counter' - e.g. it stores an integer. This is useful for use-cases such as implementing AUTO_INCREMENT-style functionality, where each new document can be given a unique monotonically increasing id.

    this method should not be used with JSON documents. Use this method only when explicitly dealing with counter documents. It may invalidate an existing JSON document.

    id

    the unique identifier of the document

    delta

    the amount to decrement by, which should be a positive amount

    options

    configure options that affect this operation

    returns

    on success, a Success(CounterResult), else a Failure(CouchbaseException). This could be com.couchbase.client.core.error.DocumentDoesNotExistException, indicating the document could not be found. any scala.util.control.NonFatal error returned will derive ultimately from com.couchbase.client.core.error.CouchbaseException. See the error handling docs for more detail.

  10. def decrement(id: String, delta: Long, initial: Option[Long] = None, durability: Durability = Disabled, timeout: Duration = Duration.MinusInf): Try[CounterResult]

    Decrement a Couchbase 'counter' document.

    Decrement a Couchbase 'counter' document. though it is common to use Couchbase to store exclusively JSON, Couchbase is actually agnostic to what is stored. It is possible to use a document as a 'counter' - e.g. it stores an integer. This is useful for use-cases such as implementing AUTO_INCREMENT-style functionality, where each new document can be given a unique monotonically increasing id.

    this method should not be used with JSON documents. Use this method only when explicitly dealing with counter documents. It may invalidate an existing JSON document.

    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.DecrementOptions instead, which supports all available options.

    id

    the unique identifier of the document

    delta

    the amount to decrement by, which should be a positive amount

    initial

    if not-None, the amount to initialise the document too, if it does not exist. If this is not set, and the document does not exist, Failure(DocumentDoesNotExistException) will be returned

    durability

    writes in Couchbase are written to a single node, and from there the Couchbase Server will take care of sending that mutation to any configured replicas. This parameter provides some control over ensuring the success of the mutation's replication. See com.couchbase.client.scala.durability.Durability for a detailed discussion.

    timeout

    when the operation will timeout. This will default to timeoutConfig().kvTimeout() in the provided com.couchbase.client.scala.env.ClusterEnvironment.

    returns

    on success, a Success(CounterResult), else a Failure(CouchbaseException). This could be com.couchbase.client.core.error.DocumentDoesNotExistException, indicating the document could not be found. any scala.util.control.NonFatal error returned will derive ultimately from com.couchbase.client.core.error.CouchbaseException. See the error handling docs for more detail.

  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  14. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. def increment(id: String, delta: Long, options: IncrementOptions): Try[CounterResult]

    Increment a Couchbase 'counter' document.

    Increment a Couchbase 'counter' document. though it is common to use Couchbase to store exclusively JSON, Couchbase is actually agnostic to what is stored. It is possible to use a document as a 'counter' - e.g. it stores an integer. This is useful for use-cases such as implementing AUTO_INCREMENT-style functionality, where each new document can be given a unique monotonically increasing id.

    this method should not be used with JSON documents. Use this method only when explicitly dealing with counter documents. It may invalidate an existing JSON document.

    id

    the unique identifier of the document

    delta

    the amount to increment by

    options

    configure options that affect this operation

    returns

    on success, a Success(CounterResult), else a Failure(CouchbaseException). This could be com.couchbase.client.core.error.DocumentDoesNotExistException, indicating the document could not be found. any scala.util.control.NonFatal error returned will derive ultimately from com.couchbase.client.core.error.CouchbaseException. See the error handling docs for more detail.

  17. def increment(id: String, delta: Long, initial: Option[Long] = None, durability: Durability = Disabled, timeout: Duration = Duration.MinusInf): Try[CounterResult]

    Increment a Couchbase 'counter' document.

    Increment a Couchbase 'counter' document. though it is common to use Couchbase to store exclusively JSON, Couchbase is actually agnostic to what is stored. It is possible to use a document as a 'counter' - e.g. it stores an integer. This is useful for use-cases such as implementing AUTO_INCREMENT-style functionality, where each new document can be given a unique monotonically increasing id.

    this method should not be used with JSON documents. Use this method only when explicitly dealing with counter documents. It may invalidate an existing JSON document.

    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.IncrementOptions instead, which supports all available options.

    id

    the unique identifier of the document

    delta

    the amount to increment by

    initial

    if not-None, the amount to initialise the document too, if it does not exist. If this is not set, and the document does not exist, Failure(DocumentDoesNotExistException) will be returned

    durability

    writes in Couchbase are written to a single node, and from there the Couchbase Server will take care of sending that mutation to any configured replicas. This parameter provides some control over ensuring the success of the mutation's replication. See com.couchbase.client.scala.durability.Durability for a detailed discussion.

    timeout

    when the operation will timeout. This will default to timeoutConfig().kvTimeout() in the provided com.couchbase.client.scala.env.ClusterEnvironment.

    returns

    on success, a Success(CounterResult), else a Failure(CouchbaseException). This could be com.couchbase.client.core.error.DocumentDoesNotExistException, indicating the document could not be found. any scala.util.control.NonFatal error returned will derive ultimately from com.couchbase.client.core.error.CouchbaseException. See the error handling docs for more detail.

  18. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  19. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  21. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  22. def prepend(id: String, content: Array[Byte], options: PrependOptions): Try[MutationResult]

    Add bytes to the beginning of a Couchbase binary document.

    Add bytes to the beginning of a Couchbase binary document.

    this method should not be used with JSON documents. This operates at the byte level and is unsuitable for dealing with JSON documents. Use this method only when explicitly dealing with binary or UTF-8 documents. It may invalidate an existing JSON document.

    id

    the unique identifier of the document

    content

    the bytes to append

    options

    configure options that affect this operation

    returns

    on success, a Success(MutationResult), else a Failure(CouchbaseException). This could be com.couchbase.client.core.error.DocumentDoesNotExistException, indicating the document could not be found. any scala.util.control.NonFatal error returned will derive ultimately from com.couchbase.client.core.error.CouchbaseException. See the error handling docs for more detail.

  23. def prepend(id: String, content: Array[Byte], cas: Long = 0, durability: Durability = Disabled, timeout: Duration = Duration.MinusInf): Try[MutationResult]

    Add bytes to the beginning of a Couchbase binary document.

    Add bytes to the beginning of a Couchbase binary document.

    this method should not be used with JSON documents. This operates at the byte level and is unsuitable for dealing with JSON documents. Use this method only when explicitly dealing with binary or UTF-8 documents. It may invalidate an existing JSON document.

    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.PrependOptions instead, which supports all available options.

    id

    the unique identifier of the document

    content

    the bytes to append

    cas

    Couchbase documents all have a CAS (Compare-And-Set) field, a simple integer that allows optimistic concurrency - e.g. it can detect if another agent has modified a document in-between this agent getting and modifying the document. See these JSON docs for a full description. The default is 0, which disables CAS checking.

    durability

    writes in Couchbase are written to a single node, and from there the Couchbase Server will take care of sending that mutation to any configured replicas. This parameter provides some control over ensuring the success of the mutation's replication. See com.couchbase.client.scala.durability.Durability for a detailed discussion.

    timeout

    when the operation will timeout. This will default to timeoutConfig().kvTimeout() in the provided com.couchbase.client.scala.env.ClusterEnvironment.

    returns

    on success, a Success(MutationResult), else a Failure(CouchbaseException). This could be com.couchbase.client.core.error.DocumentDoesNotExistException, indicating the document could not be found. any scala.util.control.NonFatal error returned will derive ultimately from com.couchbase.client.core.error.CouchbaseException. See the error handling docs for more detail.

  24. lazy val reactive: ReactiveBinaryCollection

    A reactive version of this API.

  25. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  26. def toString(): String
    Definition Classes
    AnyRef → Any
  27. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  28. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  29. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped