T - the concrete subtype, for fluent method chainingpublic abstract class BaseIncrexParams<T extends BaseIncrexParams<T>> extends java.lang.Object implements IParams
INCREX parameters. Owns options common to both the integer-bounded
variant (IncrexParams) and the float-bounded variant (IncrexFloatParams):
SATURATE, the EX/PX/EXAT/PXAT/PERSIST expiration
block, and ENX.
Bounds (LBOUND/UBOUND) live on the concrete subclasses so the bound type matches
the increment type at compile time — integer-mode increx only accepts
IncrexParams, float-mode increx only accepts IncrexFloatParams.
| Constructor and Description |
|---|
BaseIncrexParams() |
| Modifier and Type | Method and Description |
|---|---|
void |
addParams(CommandArguments args)
Wire-format emission.
|
T |
enx()
Apply the expiry only if the key does not already have one (
Expiry only if Not eXists). |
boolean |
equals(java.lang.Object o) |
T |
ex(long secondsToExpire)
Set the specified expire time, in seconds.
|
T |
exAt(long seconds)
Set the specified Unix time at which the key will expire, in seconds.
|
int |
hashCode() |
T |
persist()
Remove the time to live associated with the key.
|
T |
px(long millisecondsToExpire)
Set the specified expire time, in milliseconds.
|
T |
pxAt(long milliseconds)
Set the specified Unix time at which the key will expire, in milliseconds.
|
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.
|
public T ex(long secondsToExpire)
public T px(long millisecondsToExpire)
public T exAt(long seconds)
public T pxAt(long milliseconds)
public T persist()
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 enx()
Expiry only if Not eXists).
If the key already has a TTL, the existing TTL is preserved.public void addParams(CommandArguments args)
SATURATE → expiry → ENX.public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.ObjectCopyright © 2026. All rights reserved.