java.lang.Object
io.lettuce.core.XClaimArgs
public class XClaimArgs extends Object
Argument list builder for the Redis XCLAIM command. Static import the methods
from
XClaimArgs.Builder and call the methods: minIdleTime(…) .
XClaimArgs is a mutable object and instances should be used only once to avoid shared mutable state.
- Since:
- 5.1
- Author:
- Mark Paluch
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classXClaimArgs.BuilderBuilder entry points forXAddArgs. -
Constructor Summary
Constructors Constructor Description XClaimArgs() -
Method Summary
Modifier and Type Method Description <K, V> voidbuild(CommandArgs<K,V> args)XClaimArgsforce()Creates the pending message entry in the PEL even if certain specified IDs are not already in the PEL assigned to a different client.XClaimArgsforce(boolean force)Creates the pending message entry in the PEL even if certain specified IDs are not already in the PEL assigned to a different client.XClaimArgsidle(long milliseconds)Set the idle time (last time it was delivered) of the message.XClaimArgsidle(Duration idleTime)Set the idle time (last time it was delivered) of the message.XClaimArgsjustid()Set theJUSTIDflag to return just the message id and do not increment the retry counter.XClaimArgsminIdleTime(long milliseconds)Return only messages that are idle for at leastmilliseconds.XClaimArgsminIdleTime(Duration minIdleTime)Return only messages that are idle for at leastminIdleTime.XClaimArgsretryCount(long retrycount)Set the retry counter to the specified value.XClaimArgstime(long millisecondsUnixTime)This is the same as IDLE but instead of a relative amount of milliseconds, it sets the idle time to a specific unix time (in milliseconds).XClaimArgstime(TemporalAccessor timestamp)This is the same as IDLE but instead of a relative amount of milliseconds, it sets the idle time to a specific unix time (in milliseconds).
-
Constructor Details
-
XClaimArgs
public XClaimArgs()
-
-
Method Details
-
justid
Set theJUSTIDflag to return just the message id and do not increment the retry counter. The message body is not returned when callingXCLAIM.- Returns:
this.- Since:
- 5.3
-
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.
-
idle
Set the idle time (last time it was delivered) of the message. If IDLE is not specified, an IDLE of 0 is assumed, that is, the time count is reset because the message has now a new owner trying to process it- Parameters:
milliseconds- idle time.- Returns:
this.
-
idle
Set the idle time (last time it was delivered) of the message. If IDLE is not specified, an IDLE of 0 is assumed, that is, the time count is reset because the message has now a new owner trying to process it- Parameters:
idleTime- idle time.- Returns:
this.
-
time
This is the same as IDLE but instead of a relative amount of milliseconds, it sets the idle time to a specific unix time (in milliseconds). This is useful in order to rewrite the AOF file generating XCLAIM commands.- Parameters:
millisecondsUnixTime- idle time.- Returns:
this.
-
time
This is the same as IDLE but instead of a relative amount of milliseconds, it sets the idle time to a specific unix time (in milliseconds). This is useful in order to rewrite the AOF file generating XCLAIM commands.- Parameters:
timestamp- idle time.- Returns:
this.
-
retryCount
Set the retry counter to the specified value. This counter is incremented every time a message is delivered again. NormallyXCLAIMdoes not alter this counter, which is just served to clients when the XPENDING command is called: this way clients can detect anomalies, like messages that are never processed for some reason after a big number of delivery attempts.- Parameters:
retrycount- number of retries.- Returns:
this.
-
force
Creates the pending message entry in the PEL even if certain specified IDs are not already in the PEL assigned to a different client. However the message must be exist in the stream, otherwise the IDs of non existing messages are ignored.- Returns:
this.
-
force
Creates the pending message entry in the PEL even if certain specified IDs are not already in the PEL assigned to a different client. However the message must be exist in the stream, otherwise the IDs of non existing messages are ignored.- Parameters:
force-trueto enforce PEL creation.- Returns:
this.
-
build
-