public class XReadArgs extends Object
XReadArgs.Builder and call the methods: block(…) .
XReadArgs is a mutable object and instances should be used only once to avoid shared mutable state.| Modifier and Type | Class and Description |
|---|---|
static class |
XReadArgs.Builder
Builder entry points for
XReadArgs. |
static class |
XReadArgs.StreamOffset<K>
Value object representing a Stream with its offset.
|
| Constructor and Description |
|---|
XReadArgs() |
| Modifier and Type | Method and Description |
|---|---|
XReadArgs |
block(Duration timeout)
Perform a blocking read and wait up to a
timeout for a new stream message. |
XReadArgs |
block(long milliseconds)
Perform a blocking read and wait up to
milliseconds for a new stream message. |
<K,V> void |
build(CommandArgs<K,V> args) |
XReadArgs |
count(long count)
Limit read to
count messages. |
XReadArgs |
noack(boolean noack)
Use NOACK option to disable auto-acknowledgement.
|
public XReadArgs block(long milliseconds)
milliseconds for a new stream message.milliseconds - max time to wait.this.public XReadArgs block(Duration timeout)
timeout for a new stream message.timeout - max time to wait.this.public XReadArgs count(long count)
count messages.count - number of messages.this.public XReadArgs noack(boolean noack)
noack - true to disable auto-ack.this.public <K,V> void build(CommandArgs<K,V> args)
Copyright © 2019 lettuce.io. All rights reserved.