java.lang.Object
io.lettuce.core.XReadArgs
public class XReadArgs extends Object
Argument list builder for the Redis XREAD and XREADGROUP commands.
Static import the methods from
XReadArgs.Builder and call the methods: block(…) .
XReadArgs 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 classXReadArgs.BuilderBuilder entry points forXReadArgs.static classXReadArgs.StreamOffset<K>Value object representing a Stream with its offset. -
Constructor Summary
Constructors Constructor Description XReadArgs() -
Method Summary
Modifier and Type Method Description XReadArgsblock(long milliseconds)Perform a blocking read and wait up tomillisecondsfor a new stream message.XReadArgsblock(Duration timeout)Perform a blocking read and wait up to atimeoutfor a new stream message.<K, V> voidbuild(CommandArgs<K,V> args)XReadArgscount(long count)Limit read tocountmessages.XReadArgsnoack(boolean noack)Use NOACK option to disable auto-acknowledgement.
-
Constructor Details
-
XReadArgs
public XReadArgs()
-
-
Method Details
-
block
Perform a blocking read and wait up tomillisecondsfor a new stream message.- Parameters:
milliseconds- max time to wait.- Returns:
this.
-
block
Perform a blocking read and wait up to atimeoutfor a new stream message.- Parameters:
timeout- max time to wait.- Returns:
this.
-
count
Limit read tocountmessages.- Parameters:
count- number of messages.- Returns:
this.
-
noack
Use NOACK option to disable auto-acknowledgement. Only valid for XREADGROUP.- Parameters:
noack-trueto disable auto-ack.- Returns:
this.
-
build
-