Class SetArgs
- java.lang.Object
-
- io.quarkus.redis.datasource.value.SetArgs
-
- All Implemented Interfaces:
RedisCommandExtraArguments
- Direct Known Subclasses:
SetArgs
public class SetArgs extends Object implements RedisCommandExtraArguments
Argument list for the Redis SET command.
-
-
Constructor Summary
Constructors Constructor Description SetArgs()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SetArgs
ex(long timeout)
Set the specified expire time, in seconds.SetArgs
ex(Duration timeout)
Sets the expiration.SetArgs
exAt(long timestamp)
Sets the expiration timeSetArgs
exAt(Instant timestamp)
Sets the expiration timeSetArgs
get()
Return the old string stored at key, or nil if key did not exist.SetArgs
keepttl()
Set the value and retain the existing TTL.SetArgs
nx()
Only set the key if it does not already exist.SetArgs
px(long timeout)
Set the specified expire time, in milliseconds.SetArgs
px(Duration timeout)
Set the specified expire time, in milliseconds.SetArgs
pxAt(long timestamp)
Set the specified Unix time at which the key will expire, in milliseconds.SetArgs
pxAt(Instant timestamp)
Set the specified Unix time at which the key will expire, in milliseconds.List<Object>
toArgs()
SetArgs
xx()
Only set the key if it already exists.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.quarkus.redis.datasource.RedisCommandExtraArguments
toArgs
-
-
-
-
Method Detail
-
ex
public SetArgs ex(long timeout)
Set the specified expire time, in seconds.- Parameters:
timeout
- expire time in seconds.- Returns:
- the current
GetExArgs
-
ex
public SetArgs ex(Duration timeout)
Sets the expiration.- Parameters:
timeout
- expire time in seconds.- Returns:
- the current
GetExArgs
-
exAt
public SetArgs exAt(long timestamp)
Sets the expiration time- Parameters:
timestamp
- the timestamp- Returns:
- the current
GetExArgs
-
exAt
public SetArgs exAt(Instant timestamp)
Sets the expiration time- Parameters:
timestamp
- the timestamp type: posix time in seconds.- Returns:
- the current
GetExArgs
-
px
public SetArgs px(long timeout)
Set the specified expire time, in milliseconds.- Parameters:
timeout
- expire time in milliseconds.- Returns:
- the current
GetExArgs
-
px
public SetArgs px(Duration timeout)
Set the specified expire time, in milliseconds.- Parameters:
timeout
- expire time in milliseconds.- Returns:
- the current
GetExArgs
-
pxAt
public SetArgs pxAt(long timestamp)
Set the specified Unix time at which the key will expire, in milliseconds.- Parameters:
timestamp
- the timestamp- Returns:
- the current
GetExArgs
-
pxAt
public SetArgs pxAt(Instant timestamp)
Set the specified Unix time at which the key will expire, in milliseconds.- Parameters:
timestamp
- the timestamp- Returns:
- the current
SetArgs
-
nx
public SetArgs nx()
Only set the key if it does not already exist.- Returns:
- the current
SetArgs
-
keepttl
public SetArgs keepttl()
Set the value and retain the existing TTL.- Returns:
- the current
SetArgs
-
xx
public SetArgs xx()
Only set the key if it already exists.- Returns:
- the current
SetArgs
-
get
public SetArgs get()
Return the old string stored at key, or nil if key did not exist. An error is returned and SET aborted if the value stored at key is not a string.- Returns:
- the current
SetArgs
-
toArgs
public List<Object> toArgs()
- Specified by:
toArgs
in interfaceRedisCommandExtraArguments
- Returns:
- the list of arguments.
-
-