public class HSetExArgs extends Object implements CompositeArgument
HSetExArgs.Builder and chain the method calls: ex(10).nx().
HSetExArgs is a mutable object and instances should be used only once to avoid shared mutable state.
| Modifier and Type | Class and Description |
|---|---|
static class |
HSetExArgs.Builder
Builder entry points for
HSetExArgs. |
| Constructor and Description |
|---|
HSetExArgs() |
| Modifier and Type | Method and Description |
|---|---|
<K,V> void |
build(CommandArgs<K,V> args)
Build command arguments and contribute arguments to
CommandArgs. |
HSetExArgs |
ex(Duration timeout)
Set the specified expire time, in seconds.
|
HSetExArgs |
exAt(Instant timestamp)
Set the specified expire at time using a posix
timestamp. |
HSetExArgs |
fnx()
Only set the key if it does not already exist.
|
HSetExArgs |
fxx()
Only set the key if it already exists.
|
HSetExArgs |
keepttl()
Set the value and retain the existing TTL.
|
HSetExArgs |
px(Duration timeout)
Set the specified expire time, in milliseconds.
|
HSetExArgs |
pxAt(Instant timestamp)
Set the specified expire at time using a posix
timestamp. |
public HSetExArgs ex(Duration timeout)
timeout - expire time in seconds.this HSetExArgs.public HSetExArgs exAt(Instant timestamp)
timestamp.timestamp - the timestamp type: posix time in seconds.this HSetExArgs.public HSetExArgs px(Duration timeout)
timeout - expire time in milliseconds.this HSetExArgs.public HSetExArgs pxAt(Instant timestamp)
timestamp.timestamp - the timestamp type: posix time in milliseconds.this HSetExArgs.public HSetExArgs fnx()
this HSetExArgs.public HSetExArgs keepttl()
this HSetExArgs.public HSetExArgs fxx()
this HSetExArgs.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 © 2025 lettuce.io. All rights reserved.