Class ReactiveStreamCommands.ReadCommand
java.lang.Object
org.springframework.data.redis.connection.ReactiveStreamCommands.ReadCommand
- Enclosing interface:
ReactiveStreamCommands
XRANGE
/XREVRANGE
command parameters.- Since:
- 2.2
- Author:
- Mark Paluch, Christoph Strobl, Tugdual Grall, Dengliming, Mark John Moreno, jinkshower, Jeonggyu Choi
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionReadCommand
(List<StreamOffset<ByteBuffer>> streamOffsets, @Nullable StreamReadOptions readOptions, @Nullable 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.@Nullable Consumer
@Nullable StreamReadOptions
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
-