public class XClaimArgs extends Object implements CompositeArgument
XClaimArgs.Builder
and call the methods: minIdleTime(…)
.
XClaimArgs
is a mutable object and instances should be used only once to avoid shared mutable state.
Modifier and Type | Class and Description |
---|---|
static class |
XClaimArgs.Builder
Builder entry points for
XAddArgs . |
Constructor and Description |
---|
XClaimArgs() |
Modifier and Type | Method and Description |
---|---|
<K,V> void |
build(CommandArgs<K,V> args)
Build command arguments and contribute arguments to
CommandArgs . |
XClaimArgs |
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.
|
XClaimArgs |
force(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.
|
XClaimArgs |
idle(Duration idleTime)
Set the idle time (last time it was delivered) of the message.
|
XClaimArgs |
idle(long milliseconds)
Set the idle time (last time it was delivered) of the message.
|
XClaimArgs |
justid()
Set the
JUSTID flag to return just the message id and do not increment the retry counter. |
XClaimArgs |
minIdleTime(Duration minIdleTime)
Return only messages that are idle for at least
minIdleTime . |
XClaimArgs |
minIdleTime(long milliseconds)
Return only messages that are idle for at least
milliseconds . |
XClaimArgs |
retryCount(long retrycount)
Set the retry counter to the specified value.
|
XClaimArgs |
time(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).
|
XClaimArgs |
time(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).
|
public XClaimArgs justid()
JUSTID
flag to return just the message id and do not increment the retry counter. The message body is not
returned when calling XCLAIM
.this
.public XClaimArgs minIdleTime(long milliseconds)
milliseconds
.milliseconds
- min idle time.this
.public XClaimArgs minIdleTime(Duration minIdleTime)
minIdleTime
.minIdleTime
- min idle time.this
.public XClaimArgs idle(long milliseconds)
milliseconds
- idle time.this
.public XClaimArgs idle(Duration idleTime)
idleTime
- idle time.this
.public XClaimArgs time(long millisecondsUnixTime)
millisecondsUnixTime
- idle time.this
.public XClaimArgs time(TemporalAccessor timestamp)
timestamp
- idle time.this
.public XClaimArgs retryCount(long retrycount)
XCLAIM
does 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.retrycount
- number of retries.this
.public XClaimArgs force()
this
.public XClaimArgs force(boolean force)
force
- true
to enforce PEL creation.this
.public <K,V> void build(CommandArgs<K,V> args)
CompositeArgument
CommandArgs
.
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.
build
in interface CompositeArgument
K
- Key type.V
- Value type.args
- the command arguments, must not be null
.Copyright © 2025 lettuce.io. All rights reserved.