public class InsertOptions extends CommonDurabilityOptions<InsertOptions>
Modifier and Type | Class and Description |
---|---|
class |
InsertOptions.Built |
CommonDurabilityOptions.BuiltCommonDurabilityOptions
CommonOptions.BuiltCommonOptions
Modifier and Type | Method and Description |
---|---|
InsertOptions.Built |
build() |
InsertOptions |
expiry(Duration expiry)
Sets the expiry for the document.
|
InsertOptions |
expiry(Instant expiry)
Sets the expiry for the document.
|
static InsertOptions |
insertOptions() |
InsertOptions |
transcoder(Transcoder transcoder)
Allows to specify a custom transcoder that is used to encode the content of the request.
|
durability, durability
clientContext, parentSpan, retryStrategy, self, timeout
public static InsertOptions insertOptions()
public InsertOptions 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.public InsertOptions expiry(Instant expiry)
expiry
- the point in time when the document will expire.public InsertOptions transcoder(Transcoder transcoder)
transcoder
- the custom transcoder that should be used for encoding.InsertOptions
to allow method chaining.@Stability.Internal public InsertOptions.Built build()
Copyright © 2021 Couchbase, Inc.. All rights reserved.