public class XAutoClaimArgs<K> extends Object implements CompositeArgument
XAutoClaimArgs.Builder
and call the methods: xautoclaim(…)
.
XAutoClaimArgs
is a mutable object and instances should be used only once to avoid shared mutable state.
Modifier and Type | Class and Description |
---|---|
static class |
XAutoClaimArgs.Builder
Builder entry points for
XAutoClaimArgs . |
Constructor and Description |
---|
XAutoClaimArgs() |
Modifier and Type | Method and Description |
---|---|
<K,V> void |
build(CommandArgs<K,V> args)
Build command arguments and contribute arguments to
CommandArgs . |
XAutoClaimArgs<K> |
consumer(Consumer<K> consumer)
Configure the
Consumer . |
XAutoClaimArgs<K> |
count(long count)
The optional
count argument, which defaults to 100 , is the upper limit of the number of entries that the
command attempts to claim. |
boolean |
isJustid() |
XAutoClaimArgs<K> |
justid()
The optional
JUSTID argument changes the reply to return just an array of IDs of messages successfully claimed,
without returning the actual message. |
XAutoClaimArgs<K> |
minIdleTime(Duration minIdleTime)
Return only messages that are idle for at least
minIdleTime . |
XAutoClaimArgs<K> |
minIdleTime(long milliseconds)
Return only messages that are idle for at least
milliseconds . |
XAutoClaimArgs<K> |
startId(String startId)
Set the startId.
|
public XAutoClaimArgs<K> consumer(Consumer<K> consumer)
Consumer
.consumer
- this
.public XAutoClaimArgs<K> count(long count)
count
argument, which defaults to 100
, is the upper limit of the number of entries that the
command attempts to claim.count
- this
.public XAutoClaimArgs<K> justid()
JUSTID
argument 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.this
.public XAutoClaimArgs<K> minIdleTime(long milliseconds)
milliseconds
.milliseconds
- min idle time.this
.public XAutoClaimArgs<K> minIdleTime(Duration minIdleTime)
minIdleTime
.minIdleTime
- min idle time.this
.public XAutoClaimArgs<K> startId(String startId)
startId
- public boolean isJustid()
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 © 2023 lettuce.io. All rights reserved.