public interface ReactiveStreamOperations<K,HK,HV> extends HashMapperProvider<HK,HV>
| Modifier and Type | Method and Description |
|---|---|
reactor.core.publisher.Mono<Long> |
acknowledge(K key,
String group,
RecordId... recordIds)
Acknowledge one or more records as processed.
|
default reactor.core.publisher.Mono<Long> |
acknowledge(K key,
String group,
String... recordIds)
Acknowledge one or more records as processed.
|
default reactor.core.publisher.Mono<Long> |
acknowledge(String group,
Record<K,?> record)
Acknowledge the given record as processed.
|
default reactor.core.publisher.Mono<RecordId> |
add(K key,
Map<? extends HK,? extends HV> content)
Append a record to the stream
key. |
default reactor.core.publisher.Flux<RecordId> |
add(K key,
org.reactivestreams.Publisher<? extends Map<? extends HK,? extends HV>> bodyPublisher)
Append one or more records to the stream
key. |
default reactor.core.publisher.Mono<RecordId> |
add(MapRecord<K,? extends HK,? extends HV> record)
Append a record, backed by a
Map holding the field/value pairs, to the stream. |
reactor.core.publisher.Mono<RecordId> |
add(Record<K,?> record)
Append the record, backed by the given value, to the stream.
|
reactor.core.publisher.Flux<StreamInfo.XInfoConsumer> |
consumers(K key,
String group)
Obtain information about every consumer in a specific consumer group for the stream stored at the
specified key.
|
reactor.core.publisher.Mono<String> |
createGroup(K key,
ReadOffset readOffset,
String group)
Create a consumer group.
|
default reactor.core.publisher.Mono<String> |
createGroup(K key,
String group)
Create a consumer group at the
latest offset. |
reactor.core.publisher.Mono<Long> |
delete(K key,
RecordId... recordIds)
Removes the specified records from the stream.
|
default reactor.core.publisher.Mono<Long> |
delete(K key,
String... recordIds)
Removes the specified records from the stream.
|
default reactor.core.publisher.Mono<Long> |
delete(Record<K,?> record)
Removes a given
Record from the stream. |
reactor.core.publisher.Mono<String> |
deleteConsumer(K key,
Consumer consumer)
Delete a consumer from a consumer group.
|
MapRecord<K,HK,HV> |
deserializeRecord(ByteBufferRecord record)
Deserialize a
ByteBufferRecord using the configured serialization context into a MapRecord. |
reactor.core.publisher.Mono<String> |
destroyGroup(K key,
String group)
Destroy a consumer group.
|
<V> HashMapper<V,HK,HV> |
getHashMapper(Class<V> targetType)
Get the
HashMapper for a specific type. |
reactor.core.publisher.Flux<StreamInfo.XInfoGroup> |
groups(K key)
Obtain information about consumer groups associated with the stream stored at the specified
key.
|
reactor.core.publisher.Mono<StreamInfo.XInfoStream> |
info(K key)
Obtain general information about the stream stored at the specified key.
|
default <V> ObjectRecord<K,V> |
map(MapRecord<K,HK,HV> record,
Class<V> targetType)
Map records from
MapRecord to ObjectRecord. |
default reactor.core.publisher.Mono<PendingMessages> |
pending(K key,
Consumer consumer)
Obtained detailed information about all pending messages for a given
Consumer. |
reactor.core.publisher.Mono<PendingMessages> |
pending(K key,
Consumer consumer,
Range<?> range,
long count)
|
reactor.core.publisher.Mono<PendingMessagesSummary> |
pending(K key,
String group)
Obtain the
PendingMessagesSummary for a given consumer group. |
reactor.core.publisher.Mono<PendingMessages> |
pending(K key,
String group,
Range<?> range,
long count)
|
default <V> reactor.core.publisher.Flux<ObjectRecord<K,V>> |
range(Class<V> targetType,
K key,
Range<String> range)
Read all records from a stream within a specific
Range. |
default <V> reactor.core.publisher.Flux<ObjectRecord<K,V>> |
range(Class<V> targetType,
K key,
Range<String> range,
RedisZSetCommands.Limit limit)
Read records from a stream within a specific
Range applying a RedisZSetCommands.Limit. |
default reactor.core.publisher.Flux<MapRecord<K,HK,HV>> |
range(K key,
Range<String> range)
Read records from a stream within a specific
Range. |
reactor.core.publisher.Flux<MapRecord<K,HK,HV>> |
range(K key,
Range<String> range,
RedisZSetCommands.Limit limit)
Read records from a stream within a specific
Range applying a RedisZSetCommands.Limit. |
default <V> reactor.core.publisher.Flux<ObjectRecord<K,V>> |
read(Class<V> targetType,
Consumer consumer,
StreamOffset<K>... streams)
Read records from one or more
StreamOffsets using a consumer group as ObjectRecord. |
default <V> reactor.core.publisher.Flux<ObjectRecord<K,V>> |
read(Class<V> targetType,
Consumer consumer,
StreamReadOptions readOptions,
StreamOffset<K>... streams)
Read records from one or more
StreamOffsets using a consumer group as ObjectRecord. |
default <V> reactor.core.publisher.Flux<ObjectRecord<K,V>> |
read(Class<V> targetType,
StreamOffset<K>... streams)
Read records from one or more
StreamOffsets as ObjectRecord. |
default <V> reactor.core.publisher.Flux<ObjectRecord<K,V>> |
read(Class<V> targetType,
StreamOffset<K> stream)
Read records from a
StreamOffset as ObjectRecord. |
default <V> reactor.core.publisher.Flux<ObjectRecord<K,V>> |
read(Class<V> targetType,
StreamReadOptions readOptions,
StreamOffset<K>... streams)
Read records from one or more
StreamOffsets as ObjectRecord. |
default reactor.core.publisher.Flux<MapRecord<K,HK,HV>> |
read(Consumer consumer,
StreamOffset<K>... streams)
Read records from one or more
StreamOffsets using a consumer group. |
reactor.core.publisher.Flux<MapRecord<K,HK,HV>> |
read(Consumer consumer,
StreamReadOptions readOptions,
StreamOffset<K>... streams)
Read records from one or more
StreamOffsets using a consumer group. |
default reactor.core.publisher.Flux<MapRecord<K,HK,HV>> |
read(StreamOffset<K>... streams)
Read records from one or more
StreamOffsets. |
default reactor.core.publisher.Flux<MapRecord<K,HK,HV>> |
read(StreamOffset<K> stream)
Read records from a
StreamOffset as ObjectRecord. |
reactor.core.publisher.Flux<MapRecord<K,HK,HV>> |
read(StreamReadOptions readOptions,
StreamOffset<K>... streams)
Read records from one or more
StreamOffsets. |
default <V> reactor.core.publisher.Flux<ObjectRecord<K,V>> |
reverseRange(Class<V> targetType,
K key,
Range<String> range)
Read records from a stream within a specific
Range in reverse order as ObjectRecord. |
default <V> reactor.core.publisher.Flux<ObjectRecord<K,V>> |
reverseRange(Class<V> targetType,
K key,
Range<String> range,
RedisZSetCommands.Limit limit)
Read records from a stream within a specific
Range applying a RedisZSetCommands.Limit in reverse order as
ObjectRecord. |
default reactor.core.publisher.Flux<MapRecord<K,HK,HV>> |
reverseRange(K key,
Range<String> range)
Read records from a stream within a specific
Range in reverse order. |
reactor.core.publisher.Flux<MapRecord<K,HK,HV>> |
reverseRange(K key,
Range<String> range,
RedisZSetCommands.Limit limit)
Read records from a stream within a specific
Range applying a RedisZSetCommands.Limit in reverse order. |
reactor.core.publisher.Mono<Long> |
size(K key)
Get the length of a stream.
|
reactor.core.publisher.Mono<Long> |
trim(K key,
long count)
Trims the stream to
count elements. |
reactor.core.publisher.Mono<Long> |
trim(K key,
long count,
boolean approximateTrimming)
Trims the stream to
count elements. |
default reactor.core.publisher.Mono<Long> acknowledge(K key, String group, String... recordIds)
key - the stream key.group - name of the consumer group.recordIds - record Id's to acknowledge.Mono emitting the length of acknowledged records.reactor.core.publisher.Mono<Long> acknowledge(K key, String group, RecordId... recordIds)
key - the stream key.group - name of the consumer group.recordIds - record Id's to acknowledge.Mono emitting the length of acknowledged records.default reactor.core.publisher.Mono<Long> acknowledge(String group, Record<K,?> record)
group - name of the consumer group.record - the Record to acknowledge.Mono emitting the length of acknowledged records.default reactor.core.publisher.Flux<RecordId> add(K key, org.reactivestreams.Publisher<? extends Map<? extends HK,? extends HV>> bodyPublisher)
key.key - the stream key.bodyPublisher - record body Publisher.default reactor.core.publisher.Mono<RecordId> add(K key, Map<? extends HK,? extends HV> content)
key.key - the stream key.content - record content as Map.Mono emitting the RecordId.default reactor.core.publisher.Mono<RecordId> add(MapRecord<K,? extends HK,? extends HV> record)
Map holding the field/value pairs, to the stream.record - the record to append.Mono emitting the RecordId.reactor.core.publisher.Mono<RecordId> add(Record<K,?> record)
record - must not be null.Mono emitting the RecordId.MapRecord,
ObjectRecorddefault reactor.core.publisher.Mono<Long> delete(K key, String... recordIds)
key - the stream key.recordIds - stream record Id's.Mono emitting the number of removed records.default reactor.core.publisher.Mono<Long> delete(Record<K,?> record)
Record from the stream.record - must not be null.Mono emitting the number of removed records.reactor.core.publisher.Mono<Long> delete(K key, RecordId... recordIds)
key - the stream key.recordIds - stream record Id's.Mono emitting the number of removed records.default reactor.core.publisher.Mono<String> createGroup(K key, String group)
latest offset. This command creates the stream if it
does not already exist.key - the key the stream is stored at.group - name of the consumer group.Mono emitting OK if successful.. null when used in pipeline /
transaction.reactor.core.publisher.Mono<String> createGroup(K key, ReadOffset readOffset, String group)
key - the key the stream is stored at.readOffset - the ReadOffset to apply.group - name of the consumer group.Mono emitting OK if successful.reactor.core.publisher.Mono<String> deleteConsumer(K key, Consumer consumer)
key - the stream key.consumer - consumer identified by group name and consumer key.Mono OK if successful. null when used in pipeline / transaction.reactor.core.publisher.Mono<String> destroyGroup(K key, String group)
key - the stream key.group - name of the consumer group.Mono OK if successful. null when used in pipeline / transaction.reactor.core.publisher.Flux<StreamInfo.XInfoConsumer> consumers(K key, String group)
key - the key the stream is stored at.group - name of the consumer group.reactor.core.publisher.Flux<StreamInfo.XInfoGroup> groups(K key)
key - the key the stream is stored at.reactor.core.publisher.Mono<StreamInfo.XInfoStream> info(K key)
key - the key the stream is stored at.@Nullable reactor.core.publisher.Mono<PendingMessagesSummary> pending(K key, String group)
PendingMessagesSummary for a given consumer group.key - the key the stream is stored at. Must not be null.group - the name of the consumer group. Must not be null.default reactor.core.publisher.Mono<PendingMessages> pending(K key, Consumer consumer)
Consumer.key - the key the stream is stored at. Must not be null.consumer - the consumer to fetch PendingMessages for. Must not be null.Consumer or null when used in pipeline / transaction.reactor.core.publisher.Mono<PendingMessages> pending(K key, String group, Range<?> range, long count)
key - the key the stream is stored at. Must not be null.group - the name of the consumer group. Must not be null.range - the range of messages ids to search within. Must not be null.count - limit the number of results.reactor.core.publisher.Mono<PendingMessages> pending(K key, Consumer consumer, Range<?> range, long count)
messages for a given Range and
Consumer within a consumer group.key - the key the stream is stored at. Must not be null.consumer - the name of the Consumer. Must not be null.range - the range of messages ids to search within. Must not be null.count - limit the number of results.Consumer or null when used in pipeline / transaction.reactor.core.publisher.Mono<Long> size(K key)
key - the stream key.Mono emitting the length of the stream.default reactor.core.publisher.Flux<MapRecord<K,HK,HV>> range(K key, Range<String> range)
Range.key - the stream key.range - must not be null.Flux emitting records one by one.reactor.core.publisher.Flux<MapRecord<K,HK,HV>> range(K key, Range<String> range, RedisZSetCommands.Limit limit)
Range applying a RedisZSetCommands.Limit.key - the stream key.range - must not be null.limit - must not be null.Flux emitting records one by one.default <V> reactor.core.publisher.Flux<ObjectRecord<K,V>> range(Class<V> targetType, K key, Range<String> range)
Range.targetType - the target type of the payload.key - the stream key.range - must not be null.Flux emitting records one by one.default <V> reactor.core.publisher.Flux<ObjectRecord<K,V>> range(Class<V> targetType, K key, Range<String> range, RedisZSetCommands.Limit limit)
Range applying a RedisZSetCommands.Limit.targetType - the target type of the payload.key - the stream key.range - must not be null.limit - must not be null.Flux emitting records one by one.default reactor.core.publisher.Flux<MapRecord<K,HK,HV>> read(StreamOffset<K> stream)
StreamOffset as ObjectRecord.stream - the stream to read from.Flux emitting records one by one.default <V> reactor.core.publisher.Flux<ObjectRecord<K,V>> read(Class<V> targetType, StreamOffset<K> stream)
StreamOffset as ObjectRecord.targetType - the target type of the payload.stream - the stream to read from.Flux emitting records one by one.default reactor.core.publisher.Flux<MapRecord<K,HK,HV>> read(StreamOffset<K>... streams)
StreamOffsets.streams - the streams to read from.Flux emitting records one by one.default <V> reactor.core.publisher.Flux<ObjectRecord<K,V>> read(Class<V> targetType, StreamOffset<K>... streams)
StreamOffsets as ObjectRecord.targetType - the target type of the payload.streams - the streams to read from.Flux emitting records one by one.reactor.core.publisher.Flux<MapRecord<K,HK,HV>> read(StreamReadOptions readOptions, StreamOffset<K>... streams)
StreamOffsets.readOptions - read arguments.streams - the streams to read from.Flux emitting records one by one.default <V> reactor.core.publisher.Flux<ObjectRecord<K,V>> read(Class<V> targetType, StreamReadOptions readOptions, StreamOffset<K>... streams)
StreamOffsets as ObjectRecord.targetType - the target type of the payload.readOptions - read arguments.streams - the streams to read from.Flux emitting records one by one.default reactor.core.publisher.Flux<MapRecord<K,HK,HV>> read(Consumer consumer, StreamOffset<K>... streams)
StreamOffsets using a consumer group.consumer - consumer/group.streams - the streams to read from.Flux emitting records one by one.default <V> reactor.core.publisher.Flux<ObjectRecord<K,V>> read(Class<V> targetType, Consumer consumer, StreamOffset<K>... streams)
StreamOffsets using a consumer group as ObjectRecord.targetType - the target type of the payload.consumer - consumer/group.streams - the streams to read from.Flux emitting records one by one.reactor.core.publisher.Flux<MapRecord<K,HK,HV>> read(Consumer consumer, StreamReadOptions readOptions, StreamOffset<K>... streams)
StreamOffsets using a consumer group.consumer - consumer/group.readOptions - read arguments.streams - the streams to read from.Flux emitting records one by one.default <V> reactor.core.publisher.Flux<ObjectRecord<K,V>> read(Class<V> targetType, Consumer consumer, StreamReadOptions readOptions, StreamOffset<K>... streams)
StreamOffsets using a consumer group as ObjectRecord.targetType - the target type of the payload.consumer - consumer/group.readOptions - read arguments.streams - the streams to read from.Flux emitting records one by one.default reactor.core.publisher.Flux<MapRecord<K,HK,HV>> reverseRange(K key, Range<String> range)
Range in reverse order.key - the stream key.range - must not be null.Flux emitting records one by one.reactor.core.publisher.Flux<MapRecord<K,HK,HV>> reverseRange(K key, Range<String> range, RedisZSetCommands.Limit limit)
Range applying a RedisZSetCommands.Limit in reverse order.key - the stream key.range - must not be null.limit - must not be null.Flux emitting records one by one.default <V> reactor.core.publisher.Flux<ObjectRecord<K,V>> reverseRange(Class<V> targetType, K key, Range<String> range)
Range in reverse order as ObjectRecord.targetType - the target type of the payload.key - the stream key.range - must not be null.Flux emitting records one by one.default <V> reactor.core.publisher.Flux<ObjectRecord<K,V>> reverseRange(Class<V> targetType, K key, Range<String> range, RedisZSetCommands.Limit limit)
Range applying a RedisZSetCommands.Limit in reverse order as
ObjectRecord.targetType - the target type of the payload.key - the stream key.range - must not be null.limit - must not be null.Flux emitting records one by one.reactor.core.publisher.Mono<Long> trim(K key, long count)
count elements.key - the stream key.count - length of the stream.reactor.core.publisher.Mono<Long> trim(K key, long count, boolean approximateTrimming)
count elements.key - the stream key.count - length of the stream.approximateTrimming - the trimming must be performed in a approximated way in order to maximize performances.<V> HashMapper<V,HK,HV> getHashMapper(Class<V> targetType)
HashMapper for a specific type.getHashMapper in interface HashMapperProvider<HK,HV>V - targetType - must not be null.HashMapper suitable for a given type;default <V> ObjectRecord<K,V> map(MapRecord<K,HK,HV> record, Class<V> targetType)
MapRecord to ObjectRecord.record - the stream records to map.targetType - the target type of the payload.ObjectRecord.MapRecord<K,HK,HV> deserializeRecord(ByteBufferRecord record)
ByteBufferRecord using the configured serialization context into a MapRecord.record - the stream record to map.MapRecord.Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.