java.lang.Object
io.lettuce.core.XAutoClaimArgs<K>
- All Implemented Interfaces:
CompositeArgument
public class XAutoClaimArgs<K> extends Object implements CompositeArgument
Argument list builder for the Redis XAUTOCLAIM command. Static import the
methods from
XAutoClaimArgs.Builder and call the methods: xautoclaim(…) .
XAutoClaimArgs is a mutable object and instances should be used only once to avoid shared mutable state.
- Since:
- 6.1
- Author:
- dengliming
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classXAutoClaimArgs.BuilderBuilder entry points forXAutoClaimArgs. -
Constructor Summary
Constructors Constructor Description XAutoClaimArgs() -
Method Summary
Modifier and Type Method Description <K, V> voidbuild(CommandArgs<K,V> args)Build command arguments and contribute arguments toCommandArgs.XAutoClaimArgs<K>consumer(Consumer<K> consumer)Configure theConsumer.XAutoClaimArgs<K>count(long count)The optionalcountargument, which defaults to100, is the upper limit of the number of entries that the command attempts to claim.booleanisJustid()XAutoClaimArgs<K>justid()The optionalJUSTIDargument changes the reply to return just an array of IDs of messages successfully claimed, without returning the actual message.XAutoClaimArgs<K>minIdleTime(long milliseconds)Return only messages that are idle for at leastmilliseconds.XAutoClaimArgs<K>minIdleTime(Duration minIdleTime)Return only messages that are idle for at leastminIdleTime.XAutoClaimArgs<K>startId(String startId)Set the startId.
-
Constructor Details
-
XAutoClaimArgs
public XAutoClaimArgs()
-
-
Method Details
-
consumer
Configure theConsumer.- Parameters:
consumer-- Returns:
this.
-
count
The optionalcountargument, which defaults to100, is the upper limit of the number of entries that the command attempts to claim.- Parameters:
count-- Returns:
this.
-
justid
The optionalJUSTIDargument changes the reply to return just an array of IDs of messages successfully claimed, without returning the actual message. Using this option means the retry counter is not incremented.- Returns:
this.
-
minIdleTime
Return only messages that are idle for at leastmilliseconds.- Parameters:
milliseconds- min idle time.- Returns:
this.
-
minIdleTime
Return only messages that are idle for at leastminIdleTime.- Parameters:
minIdleTime- min idle time.- Returns:
this.
-
startId
Set the startId.- Parameters:
startId-- Returns:
-
isJustid
public boolean isJustid() -
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.
-