public interface BoundStreamOperations<K,HK,HV>
Modifier and Type | Method and Description |
---|---|
Long |
acknowledge(String group,
String... recordIds)
Acknowledge one or more records as processed.
|
RecordId |
add(Map<HK,HV> body)
Append a record to the stream
key . |
String |
createGroup(ReadOffset readOffset,
String group)
Create a consumer group.
|
Long |
delete(String... recordIds)
Removes the specified entries from the stream.
|
Boolean |
deleteConsumer(Consumer consumer)
Delete a consumer from a consumer group.
|
Boolean |
destroyGroup(String group)
Destroy a consumer group.
|
default List<MapRecord<K,HK,HV>> |
range(Range<String> range)
Read records from a stream within a specific
Range . |
List<MapRecord<K,HK,HV>> |
range(Range<String> range,
RedisZSetCommands.Limit limit)
Read records from a stream within a specific
Range applying a RedisZSetCommands.Limit . |
default List<MapRecord<K,HK,HV>> |
read(Consumer consumer,
ReadOffset readOffset)
Read records starting from
ReadOffset . using a consumer group. |
List<MapRecord<K,HK,HV>> |
read(Consumer consumer,
StreamReadOptions readOptions,
ReadOffset readOffset)
Read records starting from
ReadOffset . using a consumer group. |
default List<MapRecord<K,HK,HV>> |
read(ReadOffset readOffset)
Read records from
ReadOffset . |
List<MapRecord<K,HK,HV>> |
read(StreamReadOptions readOptions,
ReadOffset readOffset)
Read records starting from
ReadOffset . |
default List<MapRecord<K,HK,HV>> |
reverseRange(Range<String> range)
Read records from a stream within a specific
Range in reverse order. |
List<MapRecord<K,HK,HV>> |
reverseRange(Range<String> range,
RedisZSetCommands.Limit limit)
Read records from a stream within a specific
Range applying a RedisZSetCommands.Limit in reverse order. |
Long |
size()
Get the length of a stream.
|
Long |
trim(long count)
Trims the stream to
count elements. |
Long |
trim(long count,
boolean approximateTrimming)
Trims the stream to
count elements. |
@Nullable Long acknowledge(String group, String... recordIds)
group
- name of the consumer group.recordIds
- record Id's to acknowledge.@Nullable RecordId add(Map<HK,HV> body)
key
.body
- record body.@Nullable Long delete(String... recordIds)
recordIds
- stream record Id's.@Nullable String createGroup(ReadOffset readOffset, String group)
readOffset
- group
- name of the consumer group.@Nullable Boolean deleteConsumer(Consumer consumer)
consumer
- consumer identified by group name and consumer key.@Nullable Boolean destroyGroup(String group)
group
- name of the consumer group.@Nullable Long size()
@Nullable default List<MapRecord<K,HK,HV>> range(Range<String> range)
Range
.range
- must not be null.@Nullable List<MapRecord<K,HK,HV>> range(Range<String> range, RedisZSetCommands.Limit limit)
Range
applying a RedisZSetCommands.Limit
.range
- must not be null.limit
- must not be null.@Nullable default List<MapRecord<K,HK,HV>> read(ReadOffset readOffset)
ReadOffset
.readOffset
- the offset to read from.@Nullable List<MapRecord<K,HK,HV>> read(StreamReadOptions readOptions, ReadOffset readOffset)
ReadOffset
.readOptions
- read arguments.readOffset
- the offset to read from.@Nullable default List<MapRecord<K,HK,HV>> read(Consumer consumer, ReadOffset readOffset)
ReadOffset
. using a consumer group.consumer
- consumer/group.readOffset
- the offset to read from.@Nullable List<MapRecord<K,HK,HV>> read(Consumer consumer, StreamReadOptions readOptions, ReadOffset readOffset)
ReadOffset
. using a consumer group.consumer
- consumer/group.readOptions
- read arguments.readOffset
- the offset to read from.@Nullable default List<MapRecord<K,HK,HV>> reverseRange(Range<String> range)
Range
in reverse order.range
- must not be null.@Nullable List<MapRecord<K,HK,HV>> reverseRange(Range<String> range, RedisZSetCommands.Limit limit)
Range
applying a RedisZSetCommands.Limit
in reverse order.range
- must not be null.limit
- must not be null.@Nullable Long trim(long count)
count
elements.count
- length of the stream.@Nullable Long trim(long count, boolean approximateTrimming)
count
elements.count
- length of the stream.approximateTrimming
- the trimming must be performed in a approximated way in order to maximize performances.Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.