public class UpsertOptions extends CommonDurabilityOptions<UpsertOptions>
| Modifier and Type | Class and Description |
|---|---|
class |
UpsertOptions.Built |
CommonDurabilityOptions.BuiltCommonDurabilityOptionsCommonOptions.BuiltCommonOptions| Modifier and Type | Method and Description |
|---|---|
UpsertOptions.Built |
build() |
UpsertOptions |
expiry(Duration expiry)
Sets the expiry for the document.
|
UpsertOptions |
expiry(Instant expiry)
Sets the expiry for the document.
|
UpsertOptions |
preserveExpiry(boolean preserveExpiry)
Specifies whether an existing document's expiry should be preserved.
|
UpsertOptions |
transcoder(Transcoder transcoder)
Allows to specify a custom transcoder that is used to encode the content of the request.
|
static UpsertOptions |
upsertOptions() |
durability, durabilityclientContext, parentSpan, retryStrategy, self, timeoutpublic static UpsertOptions upsertOptions()
public UpsertOptions expiry(Duration expiry)
The duration must be less than 50 years. For expiry further in the
future, use expiry(Instant).
expiry - the duration after which the document will expire (zero duration means never expire).public UpsertOptions expiry(Instant expiry)
expiry - the point in time when the document will expire (epoch second zero means never expire).@Stability.Uncommitted @SinceCouchbase(value="7.0") public UpsertOptions preserveExpiry(boolean preserveExpiry)
If true, and the document exists, its expiry will not be modified.
Otherwise the document's expiry is determined by
expiry(Duration) or expiry(Instant).
Requires Couchbase Server 7.0 or later.
preserveExpiry - true to preserve expiry, false to set new expirypublic UpsertOptions transcoder(Transcoder transcoder)
transcoder - the custom transcoder that should be used for encoding.UpsertOptions to allow method chaining.@Stability.Internal public UpsertOptions.Built build()
Copyright © 2024 Couchbase, Inc.. All rights reserved.