public class SetArgs extends Object
SetArgs.Builder
and chain the method calls: ex(10).nx()
.
SetArgs
is a mutable object and instances should be used only once to avoid shared mutable state.Modifier and Type | Class and Description |
---|---|
static class |
SetArgs.Builder
Builder entry points for
SetArgs . |
Constructor and Description |
---|
SetArgs() |
Modifier and Type | Method and Description |
---|---|
<K,V> void |
build(CommandArgs<K,V> args) |
SetArgs |
ex(long timeout)
Set the specified expire time, in seconds.
|
SetArgs |
nx()
Only set the key if it does not already exist.
|
SetArgs |
px(long timeout)
Set the specified expire time, in milliseconds.
|
SetArgs |
xx()
Only set the key if it already exists.
|
public SetArgs ex(long timeout)
timeout
- expire time in seconds.this
SetArgs
.public SetArgs px(long timeout)
timeout
- expire time in milliseconds.this
SetArgs
.public <K,V> void build(CommandArgs<K,V> args)
Copyright © 2018 lettuce.io. All rights reserved.