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.ReadCommandgiven aStreamOffset.from(StreamOffset<ByteBuffer>... streamOffsets) Creates a newReactiveStreamCommands.ReadCommandgiven aStreamOffsets.@Nullable Consumer@Nullable StreamReadOptionswithOptions(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.ReadCommandgiven aStreamOffset.- Parameters:
streamOffset- must not be null.- Returns:
- a new
ReactiveStreamCommands.ReadCommandforStreamOffset.
-
from
Creates a newReactiveStreamCommands.ReadCommandgiven aStreamOffsets.- Parameters:
streamOffsets- must not be null.- Returns:
- a new
ReactiveStreamCommands.ReadCommandforStreamOffsets.
-
as
Applies aConsumer. Constructs a new command instance with all previously configured properties.- Parameters:
consumer- must not be null.- Returns:
- a new
ReactiveStreamCommands.ReadCommandwithConsumerapplied.
-
withOptions
Applies the givenStreamReadOptions. Constructs a new command instance with all previously configured properties.- Parameters:
options- must not be null.- Returns:
- a new
ReactiveStreamCommands.ReadCommandwithConsumerapplied.
-
getStreamOffsets
-
getReadOptions
-
getConsumer
-