Class ReactiveStreamCommands.ReadCommand
java.lang.Object
org.springframework.data.redis.connection.ReactiveStreamCommands.ReadCommand
- Enclosing interface:
- ReactiveStreamCommands
XRANGE/XREVRANGE command parameters.-
Constructor Summary
ConstructorsConstructorDescriptionReadCommand(List<StreamOffset<ByteBuffer>> streamOffsets, StreamReadOptions readOptions, 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.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.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
-