public class IncrementOptions extends CommonDurabilityOptions<IncrementOptions>
Modifier and Type | Class and Description |
---|---|
class |
IncrementOptions.Built |
CommonDurabilityOptions.BuiltCommonDurabilityOptions
CommonOptions.BuiltCommonOptions
Modifier and Type | Method and Description |
---|---|
IncrementOptions.Built |
build() |
IncrementOptions |
delta(long delta)
The amount of which the document value should be incremented.
|
IncrementOptions |
expiry(Duration expiry)
Sets the expiry for the document.
|
IncrementOptions |
expiry(Instant expiry)
Sets the expiry for the document.
|
static IncrementOptions |
incrementOptions()
Creates a new
IncrementOptions . |
IncrementOptions |
initial(long initial)
The initial value that should be used if the document has not been created yet.
|
durability, durability
clientContext, parentSpan, retryStrategy, self, timeout
public static IncrementOptions incrementOptions()
IncrementOptions
.public IncrementOptions delta(long delta)
delta
- the amount to increment.public IncrementOptions initial(long initial)
initial
- the initial value to use.public IncrementOptions expiry(Duration expiry)
CAVEAT: If the counter document already exists, this option is ignored and the document's current expiry is preserved.
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 IncrementOptions expiry(Instant expiry)
CAVEAT: If the counter document already exists, this option is ignored and the document's current expiry is preserved.
expiry
- the point in time when the document will expire (epoch second zero means never expire).@Stability.Internal public IncrementOptions.Built build()
Copyright © 2024 Couchbase, Inc.. All rights reserved.