Class ReactiveStreamCommands.ReadCommand
java.lang.Object
org.springframework.data.redis.connection.ReactiveStreamCommands.ReadCommand
- Enclosing interface:
- ReactiveStreamCommands
XRANGE
/XREVRANGE
command parameters.-
Constructor Summary
ConstructorDescriptionReadCommand
(List<StreamOffset<ByteBuffer>> streamOffsets, StreamReadOptions readOptions, Consumer consumer) -
Method Summary
Modifier and TypeMethodDescriptionApplies aConsumer
.from
(StreamOffset<ByteBuffer> streamOffset) Creates a newReactiveStreamCommands.ReadCommand
given aStreamOffset
.from
(StreamOffset<ByteBuffer>... streamOffsets) Creates a newReactiveStreamCommands.ReadCommand
given aStreamOffset
s.withOptions
(StreamReadOptions options) Applies the givenStreamReadOptions
.
-
Constructor Details
-
ReadCommand
public ReadCommand(List<StreamOffset<ByteBuffer>> streamOffsets, @Nullable StreamReadOptions readOptions, @Nullable Consumer consumer) - Parameters:
streamOffsets
- must not be null.readOptions
-consumer
-
-
-
Method Details
-
from
Creates a newReactiveStreamCommands.ReadCommand
given aStreamOffset
.- Parameters:
streamOffset
- must not be null.- Returns:
- a new
ReactiveStreamCommands.ReadCommand
forStreamOffset
.
-
from
Creates a newReactiveStreamCommands.ReadCommand
given aStreamOffset
s.- Parameters:
streamOffsets
- must not be null.- Returns:
- a new
ReactiveStreamCommands.ReadCommand
forStreamOffset
s.
-
as
Applies aConsumer
. Constructs a new command instance with all previously configured properties.- Parameters:
consumer
- must not be null.- Returns:
- a new
ReactiveStreamCommands.ReadCommand
withConsumer
applied.
-
withOptions
Applies the givenStreamReadOptions
. Constructs a new command instance with all previously configured properties.- Parameters:
options
- must not be null.- Returns:
- a new
ReactiveStreamCommands.ReadCommand
withConsumer
applied.
-
getStreamOffsets
-
getReadOptions
-
getConsumer
-