public class ExpireArgs extends Object implements CompositeArgument
ExpireArgs.Builder
and call the methods: xx(…)
gt(…)
.
ExpireArgs
is a mutable object and instances should be used only once to avoid shared mutable state.Modifier and Type | Class and Description |
---|---|
static class |
ExpireArgs.Builder
Builder entry points for
ExpireArgs . |
Constructor and Description |
---|
ExpireArgs() |
Modifier and Type | Method and Description |
---|---|
<K,V> void |
build(CommandArgs<K,V> args)
Build command arguments and contribute arguments to
CommandArgs . |
ExpireArgs |
gt()
Set expiry only when the new expiry is greater than current one.
|
ExpireArgs |
lt()
Set expiry only when the new expiry is less than current one.
|
ExpireArgs |
nx()
Set expiry only when the key has no expiry.
|
ExpireArgs |
xx()
Set expiry only when the key has an existing expiry.
|
public ExpireArgs nx()
this
.public ExpireArgs xx()
this
.public ExpireArgs gt()
this
.public ExpireArgs lt()
this
.public <K,V> void build(CommandArgs<K,V> args)
CompositeArgument
CommandArgs
.
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 CompositeArgument
K
- Key type.V
- Value type.args
- the command arguments, must not be null
.Copyright © 2024 lettuce.io. All rights reserved.