public class IncrexFloatArgs extends Object
INCREX command. Accepts double
lower/upper bounds; paired with the increx(K, double, IncrexFloatArgs) overload on the commands interface (sends
BYFLOAT on the wire).
For integer-bounded INCREX use IncrexArgs.
Usage:
IncrexFloatArgs.Builder.ubound(100.0).saturate().ex(60) IncrexFloatArgs.Builder.lbound(0.0).ubound(100.0).saturate() new IncrexFloatArgs().ex(30).enx()
| Modifier and Type | Class and Description |
|---|---|
static class |
IncrexFloatArgs.Builder |
| Constructor and Description |
|---|
IncrexFloatArgs() |
| Modifier and Type | Method and Description |
|---|---|
<K,V> void |
build(CommandArgs<K,V> args)
Build command arguments and contribute arguments to
CommandArgs. |
protected <K,V> void |
buildBounds(CommandArgs<K,V> args)
Subclasses emit their typed
LBOUND/UBOUND here. |
T |
enx()
Apply the expiry only if the key does not already have one (
Expiry only if Not eXists). |
T |
ex(long seconds) |
T |
exAt(long timestampSeconds) |
IncrexFloatArgs |
lbound(double lbound) |
T |
persist() |
T |
px(long milliseconds) |
T |
pxAt(long timestampMilliseconds) |
T |
saturate()
Saturate the result on out-of-bounds: the value is clamped to the violated bound (or the implicit numeric-type limit when
no explicit bound is set), and the second element of the reply reflects the actual applied increment.
|
IncrexFloatArgs |
ubound(double ubound) |
public IncrexFloatArgs lbound(double lbound)
public IncrexFloatArgs ubound(double ubound)
protected <K,V> void buildBounds(CommandArgs<K,V> args)
LBOUND/UBOUND here.public T saturate()
SATURATE, an out-of-bounds operation is silently rejected: the key value and TTL are unchanged and the reply is
[current_value, 0].public T ex(long seconds)
public T px(long milliseconds)
public T exAt(long timestampSeconds)
public T pxAt(long timestampMilliseconds)
public T persist()
public T enx()
Expiry only if Not eXists). If the key already has a
TTL, the existing TTL is preserved.public <K,V> void build(CommandArgs<K,V> args)
CompositeArgumentCommandArgs.
Implementing classes are required to implement this method. Depending on the command nature and configured arguments, this method may contribute arguments but is not required to add arguments if none are specified.
build in interface CompositeArgumentK - Key type.V - Value type.args - the command arguments, must not be null.Copyright © 2026 lettuce.io. All rights reserved.