java.lang.Object
io.lettuce.core.GetExArgs
- All Implemented Interfaces:
CompositeArgument
public class GetExArgs extends Object implements CompositeArgument
Argument list builder for the Redis GETEX command starting from Redis 6.2.
Static import the methods from
GetExArgs.Builder and chain the method calls: ex(10).nx().
GetExArgs is a mutable object and instances should be used only once to avoid shared mutable state.
- Since:
- 6.1
- Author:
- Mark Paluch
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGetExArgs.BuilderBuilder entry points forGetExArgs. -
Constructor Summary
Constructors Constructor Description GetExArgs() -
Method Summary
Modifier and Type Method Description <K, V> voidbuild(CommandArgs<K,V> args)Build command arguments and contribute arguments toCommandArgs.GetExArgsex(long timeout)Set the specified expire time, in seconds.GetExArgsex(Duration timeout)Set the specified expire time, in seconds.GetExArgsexAt(long timestamp)Set the specified expire at time using a posixtimestamp.GetExArgsexAt(Instant timestamp)Set the specified expire at time using a posixtimestamp.GetExArgsexAt(Date timestamp)Set the specified expire at time using a posixtimestamp.GetExArgspersist()Remove the time to live associated with the key.GetExArgspx(long timeout)Set the specified expire time, in milliseconds.GetExArgspx(Duration timeout)Set the specified expire time, in milliseconds.GetExArgspxAt(long timestamp)Set the specified expire at time using a posixtimestamp.GetExArgspxAt(Instant timestamp)Set the specified expire at time using a posixtimestamp.GetExArgspxAt(Date timestamp)Set the specified expire at time using a posixtimestamp.
-
Constructor Details
-
GetExArgs
public GetExArgs()
-
-
Method Details
-
ex
Set the specified expire time, in seconds.- Parameters:
timeout- expire time in seconds.- Returns:
thisGetExArgs.
-
ex
Set the specified expire time, in seconds.- Parameters:
timeout- expire time in seconds.- Returns:
thisGetExArgs.- Since:
- 6.1
-
exAt
Set the specified expire at time using a posixtimestamp.- Parameters:
timestamp- the timestamp type: posix time in seconds.- Returns:
thisGetExArgs.- Since:
- 6.1
-
exAt
Set the specified expire at time using a posixtimestamp.- Parameters:
timestamp- the timestamp type: posix time in seconds.- Returns:
thisGetExArgs.- Since:
- 6.1
-
exAt
Set the specified expire at time using a posixtimestamp.- Parameters:
timestamp- the timestamp type: posix time in seconds.- Returns:
thisGetExArgs.- Since:
- 6.1
-
px
Set the specified expire time, in milliseconds.- Parameters:
timeout- expire time in milliseconds.- Returns:
thisGetExArgs.
-
px
Set the specified expire time, in milliseconds.- Parameters:
timeout- expire time in milliseconds.- Returns:
thisGetExArgs.
-
pxAt
Set the specified expire at time using a posixtimestamp.- Parameters:
timestamp- the timestamp type: posix time in milliseconds.- Returns:
thisGetExArgs.- Since:
- 6.1
-
pxAt
Set the specified expire at time using a posixtimestamp.- Parameters:
timestamp- the timestamp type: posix time in milliseconds.- Returns:
thisGetExArgs.- Since:
- 6.1
-
pxAt
Set the specified expire at time using a posixtimestamp.- Parameters:
timestamp- the timestamp type: posix time in milliseconds.- Returns:
thisGetExArgs.- Since:
- 6.1
-
persist
Remove the time to live associated with the key.- Returns:
thisGetExArgs.
-
build
Description copied from interface:CompositeArgumentBuild command arguments and contribute arguments toCommandArgs.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.
- Specified by:
buildin interfaceCompositeArgument- Type Parameters:
K- Key type.V- Value type.- Parameters:
args- the command arguments, must not benull.
-