Class XClaimArgs
- java.lang.Object
-
- io.quarkus.redis.datasource.stream.XClaimArgs
-
- All Implemented Interfaces:
RedisCommandExtraArguments
public class XClaimArgs extends Object implements RedisCommandExtraArguments
The argument of the XCLAIM command.
-
-
Constructor Summary
Constructors Constructor Description XClaimArgs()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
idle(Duration idle)
Set the idle time (last time it was delivered) of the message.XClaimArgs
justId()
In the returned structure, only set the IDs of messages successfully claimed, without returning the actual message.XClaimArgs
lastId(String lastId)
Sets the last id of the message to claim.XClaimArgs
retryCount(int retryCount)
Set the retry counter to the specified value.XClaimArgs
time(long time)
This is the same asIDLE
but instead of a relative amount of milliseconds, it sets the idle time to a specific Unix time (in milliseconds).List<Object>
toArgs()
-
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
-
idle
public XClaimArgs idle(Duration idle)
Set the idle time (last time it was delivered) of the message. IfIDLE
is not specified, anIDLE
of 0 is assumed, that is, the time count is reset because the message has now a new owner trying to process it.- Parameters:
idle
- the idle duration, must not benull
- Returns:
- the current
XClaimArgs
-
time
public XClaimArgs time(long time)
This is the same asIDLE
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 theAOF
file generatingXCLAIM
commands.- Parameters:
time
- the timestamp- Returns:
- the current
XClaimArgs
-
retryCount
public XClaimArgs retryCount(int retryCount)
Set the retry counter to the specified value. This counter is incremented every time a message is delivered again. NormallyXCLAIM
does not alter this counter, which is just served to clients when theXPENDING
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
- the retry count, must be positive- Returns:
- the current
XClaimArgs
-
force
public 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. However, the message must exist in the stream, otherwise the IDs of non-existing messages are ignored.- Returns:
- the current
XClaimArgs
-
justId
public XClaimArgs justId()
In the returned structure, only set the IDs of messages successfully claimed, without returning the actual message. Using this option means the retry counter is not incremented.- Returns:
- the current
XClaimArgs
-
lastId
public XClaimArgs lastId(String lastId)
Sets the last id of the message to claim.- Parameters:
lastId
- the last id, must not benull
- Returns:
- the current
XClaimArgs
-
toArgs
public List<Object> toArgs()
- Specified by:
toArgs
in interfaceRedisCommandExtraArguments
- Returns:
- the list of arguments.
-
-