case class MutateInOptions(cas: Long = 0, document: StoreSemantics = StoreSemantics.Replace, durability: Durability = Disabled, timeout: Duration = Duration.MinusInf, parentSpan: Option[RequestSpan] = None, retryStrategy: Option[RetryStrategy] = None, transcoder: Option[Transcoder] = None, expiry: Duration = null, accessDeleted: Boolean = false, createAsDeleted: Boolean = false, expiryTime: Option[Instant] = None, preserveExpiry: Boolean = false) extends Product with Serializable
Provides control over how a mutateIn operation is performed.
- Alphabetic
- By Inheritance
- MutateInOptions
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new MutateInOptions(cas: Long = 0, document: StoreSemantics = StoreSemantics.Replace, durability: Durability = Disabled, timeout: Duration = Duration.MinusInf, parentSpan: Option[RequestSpan] = None, retryStrategy: Option[RetryStrategy] = None, transcoder: Option[Transcoder] = None, expiry: Duration = null, accessDeleted: Boolean = false, createAsDeleted: Boolean = false, expiryTime: Option[Instant] = None, preserveExpiry: Boolean = false)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def accessDeleted(value: Boolean): MutateInOptions
For internal use only: allows access to deleted documents that are in 'tombstone' form.
For internal use only: allows access to deleted documents that are in 'tombstone' form.
- Annotations
- @Internal()
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def cas(value: Long): MutateInOptions
Couchbase documents all have a CAS (Compare-And-Set) field, a simple integer that allows optimistic concurrency - e.g.
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.
The default is 0, which disables CAS checking. *
- returns
a copy of this with the change applied, for chaining.
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- def createAsDeleted(value: Boolean): MutateInOptions
For internal use only: allows creating documents in 'tombstone' form.
For internal use only: allows creating documents in 'tombstone' form.
- Annotations
- @Internal()
- def document(value: StoreSemantics): MutateInOptions
Controls whether the document should be inserted, upserted, or not touched.
Controls whether the document should be inserted, upserted, or not touched. See kv.StoreSemantics for details.
- returns
a copy of this with the change applied, for chaining.
- def durability(value: Durability): MutateInOptions
Changes the durability setting used for this operation.
Changes the durability setting used for this operation.
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.
If not specified, it defaults to com.couchbase.client.scala.durability.Durability.Disabled.
- returns
a copy of this with the change applied, for chaining.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def expiry(value: Instant): MutateInOptions
Changes the expiry setting used for this operation.
Changes the expiry setting used for this operation.
This overload should be used for any expiration times >= 30 days. If below that, use the overload that takes a
Duration
instead.Couchbase documents optionally can have an expiration field set, e.g. when they will automatically expire and be removed. On mutations if this is left at the default (0), then any expiry will be removed and the document will never expire. If the application wants to preserve expiration then they should use the
withExpiration
parameter on any gets, and provide the returned expiration parameter to any mutations.- returns
a copy of this with the change applied, for chaining.
- def expiry(value: Option[Duration]): MutateInOptions
Changes the expiry setting used for this operation.
Changes the expiry setting used for this operation.
This overload should be used for any expiration times < 30 days. If over that, use the overload that takes an
Instant
instead.Couchbase documents optionally can have an expiration field set, e.g. when they will automatically expire and be removed. On mutations if this is left at the default (null), then any expiry will be removed and the document will never expire. If the application wants to preserve expiration then they should use the
withExpiration
parameter on any gets, and provide the returned expiration parameter to any mutations.This Option-overload is provided as a convenience to help with chaining.
- returns
a copy of this with the change applied, for chaining.
- def expiry(value: Duration): MutateInOptions
Changes the expiry setting used for this operation.
Changes the expiry setting used for this operation.
This overload should be used for any expiration times < 30 days. If over that, use the overload that takes an
Instant
instead.Couchbase documents optionally can have an expiration field set, e.g. when they will automatically expire and be removed. On mutations if this is left at the default (null), then any expiry will be removed and the document will never expire. If the application wants to preserve expiration then they should use the
withExpiration
parameter on any gets, and provide the returned expiration parameter to any mutations.- returns
a copy of this with the change applied, for chaining.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- def parentSpan(value: Option[RequestSpan]): MutateInOptions
Changes the parent span setting used for this operation.
Changes the parent span setting used for this operation.
This allows tracing requests through a full distributed system.
This Option-overload is provided as a convenience to help with chaining.
- returns
a copy of this with the change applied, for chaining.
- def parentSpan(value: RequestSpan): MutateInOptions
Changes the parent span setting used for this operation.
Changes the parent span setting used for this operation.
This allows tracing requests through a full distributed system.
- returns
a copy of this with the change applied, for chaining.
- def preserveExpiry(value: Boolean): MutateInOptions
Changes whether an existing document's expiry should be preserved.
Changes whether an existing document's expiry should be preserved. Defaults to false.
If true, and the document exists, its expiry will not be modified. Otherwise the document's expiry is determined by the
expiry
orexpiryTime
setting.Requires Couchbase Server 7.0 or later.
- returns
a copy of this with the change applied, for chaining.
- Annotations
- @SinceCouchbase()
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def retryStrategy(value: RetryStrategy): MutateInOptions
Provides some control over how the SDK handles failures.
Provides some control over how the SDK handles failures. Will default to
retryStrategy()
in the provided com.couchbase.client.scala.env.ClusterEnvironment, which by default isBestEffortRetryStrategy
; this will automatically retry some operations (e.g. non-mutating ones, or mutating operations that have unambiguously failed before they mutated state) until the chosen timeout.- returns
a copy of this with the change applied, for chaining.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def timeout(value: Duration): MutateInOptions
Changes the timeout setting used for this operation.
Changes the timeout setting used for this operation.
When the operation will timeout. This will default to
timeoutConfig().kvTimeout()
in the com.couchbase.client.scala.env.ClusterEnvironment.- returns
a copy of this with the change applied, for chaining.
- def transcoder(value: Transcoder): MutateInOptions
Changes the transcoder used for this operation.
Changes the transcoder used for this operation.
The transcoder provides control over how JSON is converted and stored on the Couchbase Server.
If not specified it will default to to
transcoder()
in the com.couchbase.client.scala.env.ClusterEnvironment.This Option-overload is provided as a convenience to help with chaining.
- returns
a copy of this with the change applied, for chaining.
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)