Class RedissonStream<K,V>
- java.lang.Object
-
- org.redisson.RedissonObject
-
- org.redisson.RedissonStream<K,V>
-
- Type Parameters:
K
- key typeV
- value type
- All Implemented Interfaces:
RExpirable
,RExpirableAsync
,RObject
,RObjectAsync
,RStream<K,V>
,RStreamAsync<K,V>
public class RedissonStream<K,V> extends RedissonObject implements RStream<K,V>
- Author:
- Nikita Koksharov
-
-
Field Summary
-
Fields inherited from class org.redisson.RedissonObject
codec, commandExecutor, name
-
-
Constructor Summary
Constructors Constructor Description RedissonStream(Codec codec, CommandAsyncExecutor connectionManager, String name)
RedissonStream(CommandAsyncExecutor connectionManager, String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
ack(String groupName, StreamMessageId... id)
Marks pending messages by group name and streamids
as correctly processed.RFuture<Long>
ackAsync(String groupName, StreamMessageId... ids)
Marks pending messages by group name and streamids
as correctly processed.StreamMessageId
add(K key, V value)
StreamMessageId
add(K key, V value, int trimLen, boolean trimStrict)
StreamMessageId
add(StreamAddArgs<K,V> args)
Appends a new entry/entries and returns generated Stream Message IDvoid
add(StreamMessageId id, K key, V value)
void
add(StreamMessageId id, K key, V value, int trimLen, boolean trimStrict)
void
add(StreamMessageId id, StreamAddArgs<K,V> args)
Appends a new entry/entries by specified Stream Message IDStreamMessageId
addAll(Map<K,V> entries)
StreamMessageId
addAll(Map<K,V> entries, int trimLen, boolean trimStrict)
void
addAll(StreamMessageId id, Map<K,V> entries)
void
addAll(StreamMessageId id, Map<K,V> entries, int trimLen, boolean trimStrict)
RFuture<StreamMessageId>
addAllAsync(Map<K,V> entries)
RFuture<StreamMessageId>
addAllAsync(Map<K,V> entries, int trimLen, boolean trimStrict)
RFuture<Void>
addAllAsync(StreamMessageId id, Map<K,V> entries)
RFuture<Void>
addAllAsync(StreamMessageId id, Map<K,V> entries, int trimLen, boolean trimStrict)
RFuture<StreamMessageId>
addAsync(K key, V value)
RFuture<StreamMessageId>
addAsync(K key, V value, int trimLen, boolean trimStrict)
RFuture<StreamMessageId>
addAsync(StreamAddArgs<K,V> args)
Appends a new entry/entries and returns generated Stream Message IDRFuture<Void>
addAsync(StreamMessageId id, K key, V value)
RFuture<Void>
addAsync(StreamMessageId id, K key, V value, int trimLen, boolean trimStrict)
RFuture<Void>
addAsync(StreamMessageId id, StreamAddArgs<K,V> args)
Appends a new entry/entries by specified Stream Message ID<R> RFuture<R>
addCustomAsync(StreamMessageId id, StreamAddArgs<K,V> args)
AutoClaimResult<K,V>
autoClaim(String groupName, String consumerName, long idleTime, TimeUnit idleTimeUnit, StreamMessageId startId, int count)
Transfers ownership of pending messages by id to a new consumer by name if idle time of messages and startId are greater than defined value.RFuture<AutoClaimResult<K,V>>
autoClaimAsync(String groupName, String consumerName, long idleTime, TimeUnit idleTimeUnit, StreamMessageId startId, int count)
Transfers ownership of pending messages by id to a new consumer by name if idle time of messages and startId are greater than defined value.protected void
checkKey(Object key)
protected void
checkValue(Object value)
Map<StreamMessageId,Map<K,V>>
claim(String groupName, String consumerName, long idleTime, TimeUnit idleTimeUnit, StreamMessageId... ids)
Transfers ownership of pending messages by id to a new consumer by name if idle time of messages is greater than defined value.RFuture<Map<StreamMessageId,Map<K,V>>>
claimAsync(String groupName, String consumerName, long idleTime, TimeUnit idleTimeUnit, StreamMessageId... ids)
Transfers ownership of pending messages by id to a new consumer by name if idle time of messages is greater than defined value.boolean
clearExpire()
Clear an expire timeout or expire date for object.RFuture<Boolean>
clearExpireAsync()
Clear an expire timeout or expire date for object in async mode.protected RFuture<Boolean>
clearExpireAsync(String... keys)
void
createConsumer(String groupName, String consumerName)
Creates consumer of the group by name.RFuture<Void>
createConsumerAsync(String groupName, String consumerName)
Creates consumer of the group by name.void
createGroup(String groupName)
Creates consumer group by name.void
createGroup(String groupName, StreamMessageId id)
Creates consumer group by name and Stream Message ID.RFuture<Void>
createGroupAsync(String groupName)
Creates consumer group by name.RFuture<Void>
createGroupAsync(String groupName, StreamMessageId id)
Creates consumer group by name and stream id.boolean
expire(long timeToLive, TimeUnit timeUnit)
Set a timeout for object.boolean
expire(Instant instant)
Set an expire date for object.RFuture<Boolean>
expireAsync(long timeToLive, TimeUnit timeUnit)
Set a timeout for object in async mode.protected RFuture<Boolean>
expireAsync(long timeToLive, TimeUnit timeUnit, String... keys)
RFuture<Boolean>
expireAsync(Instant instant)
Set an expire date for object.boolean
expireAt(long timestamp)
UseRExpirable.expire(Instant)
insteadboolean
expireAt(Date timestamp)
UseRExpirable.expire(Instant)
insteadRFuture<Boolean>
expireAtAsync(long timestamp)
UseRExpirableAsync.expireAsync(Instant)
insteadprotected RFuture<Boolean>
expireAtAsync(long timestamp, String... keys)
RFuture<Boolean>
expireAtAsync(Date timestamp)
UseRExpirableAsync.expireAsync(Instant)
insteadFastAutoClaimResult
fastAutoClaim(String groupName, String consumerName, long idleTime, TimeUnit idleTimeUnit, StreamMessageId startId, int count)
Transfers ownership of pending messages by id to a new consumer by name if idle time of messages and startId are greater than defined value.RFuture<FastAutoClaimResult>
fastAutoClaimAsync(String groupName, String consumerName, long idleTime, TimeUnit idleTimeUnit, StreamMessageId startId, int count)
Transfers ownership of pending messages by id to a new consumer by name if idle time of messages and startId are greater than defined value.List<StreamMessageId>
fastClaim(String groupName, String consumerName, long idleTime, TimeUnit idleTimeUnit, StreamMessageId... ids)
Transfers ownership of pending messages by id to a new consumer by name if idle time of messages is greater than defined value.RFuture<List<StreamMessageId>>
fastClaimAsync(String groupName, String consumerName, long idleTime, TimeUnit idleTimeUnit, StreamMessageId... ids)
Transfers ownership of pending messages by id to a new consumer by name if idle time of messages is greater than defined value.StreamInfo<K,V>
getInfo()
Returns information about this stream.RFuture<StreamInfo<K,V>>
getInfoAsync()
Returns information about this stream.PendingResult
getPendingInfo(String groupName)
Returns common info about pending messages by group name.RFuture<PendingResult>
getPendingInfoAsync(String groupName)
Returns common info about pending messages by group name.List<StreamConsumer>
listConsumers(String groupName)
Returns list of common info about group customers for specifiedgroupName
.RFuture<List<StreamConsumer>>
listConsumersAsync(String groupName)
Returns list of objects with information about group customers for specifiedgroupName
.List<StreamGroup>
listGroups()
Returns list of common info about groups belonging to this stream.RFuture<List<StreamGroup>>
listGroupsAsync()
Returns list of objects with information about groups belonging to this stream.List<PendingEntry>
listPending(String groupName, String consumerName, StreamMessageId startId, StreamMessageId endId, int count)
Returns list of common info about pending messages by group and consumer name.List<PendingEntry>
listPending(String groupName, String consumerName, StreamMessageId startId, StreamMessageId endId, long idleTime, TimeUnit idleTimeUnit, int count)
Returns stream data of pending messages by group and customer name.List<PendingEntry>
listPending(String groupName, StreamMessageId startId, StreamMessageId endId, int count)
Returns list of common info about pending messages by group name.List<PendingEntry>
listPending(String groupName, StreamMessageId startId, StreamMessageId endId, long idleTime, TimeUnit idleTimeUnit, int count)
Returns stream data of pending messages by group name.RFuture<List<PendingEntry>>
listPendingAsync(String groupName, String consumerName, StreamMessageId startId, StreamMessageId endId, int count)
Returns list of common info about pending messages by group and consumer name.RFuture<List<PendingEntry>>
listPendingAsync(String groupName, String consumerName, StreamMessageId startId, StreamMessageId endId, long idleTime, TimeUnit idleTimeUnit, int count)
Returns list of common info about pending messages by group and consumer name.RFuture<List<PendingEntry>>
listPendingAsync(String groupName, StreamMessageId startId, StreamMessageId endId, int count)
Returns list of common info about pending messages by group name.RFuture<List<PendingEntry>>
listPendingAsync(String groupName, StreamMessageId startId, StreamMessageId endId, long idleTime, TimeUnit idleTimeUnit, int count)
Returns list of common info about pending messages by group name.Map<StreamMessageId,Map<K,V>>
pendingRange(String groupName, String consumerName, StreamMessageId startId, StreamMessageId endId, int count)
Returns stream data of pending messages by group and customer name.Map<StreamMessageId,Map<K,V>>
pendingRange(String groupName, String consumerName, StreamMessageId startId, StreamMessageId endId, long idleTime, TimeUnit idleTimeUnit, int count)
Returns stream data of pending messages by group and customer name.Map<StreamMessageId,Map<K,V>>
pendingRange(String groupName, StreamMessageId startId, StreamMessageId endId, int count)
Returns stream data of pending messages by group name.Map<StreamMessageId,Map<K,V>>
pendingRange(String groupName, StreamMessageId startId, StreamMessageId endId, long idleTime, TimeUnit idleTimeUnit, int count)
Returns stream data of pending messages by group name.RFuture<Map<StreamMessageId,Map<K,V>>>
pendingRangeAsync(String groupName, String consumerName, StreamMessageId startId, StreamMessageId endId, int count)
Returns stream data of pending messages by group and customer name.RFuture<Map<StreamMessageId,Map<K,V>>>
pendingRangeAsync(String groupName, String consumerName, StreamMessageId startId, StreamMessageId endId, long idleTime, TimeUnit idleTimeUnit, int count)
Returns stream data of pending messages by group and customer name.RFuture<Map<StreamMessageId,Map<K,V>>>
pendingRangeAsync(String groupName, StreamMessageId startId, StreamMessageId endId, int count)
Returns stream data of pending messages by group name.RFuture<Map<StreamMessageId,Map<K,V>>>
pendingRangeAsync(String groupName, StreamMessageId startId, StreamMessageId endId, long idleTime, TimeUnit idleTimeUnit, int count)
Returns stream data of pending messages by group name.Map<StreamMessageId,Map<K,V>>
range(int count, StreamMessageId startId, StreamMessageId endId)
Returns stream data in range by specified start Stream Message ID (included) and end Stream Message ID (included).Map<StreamMessageId,Map<K,V>>
range(StreamMessageId startId, StreamMessageId endId)
Returns stream data in range by specified start Stream Message ID (included) and end Stream Message ID (included).RFuture<Map<StreamMessageId,Map<K,V>>>
rangeAsync(int count, StreamMessageId startId, StreamMessageId endId)
Returns stream data in range by specified start Stream ID (included) and end Stream ID (included).RFuture<Map<StreamMessageId,Map<K,V>>>
rangeAsync(StreamMessageId startId, StreamMessageId endId)
Returns stream data in range by specified start Stream ID (included) and end Stream ID (included).Map<StreamMessageId,Map<K,V>>
rangeReversed(int count, StreamMessageId startId, StreamMessageId endId)
Returns stream data in reverse order in range by specified start Stream Message ID (included) and end Stream Message ID (included).Map<StreamMessageId,Map<K,V>>
rangeReversed(StreamMessageId startId, StreamMessageId endId)
Returns stream data in reverse order in range by specified start Stream Message ID (included) and end Stream Message ID (included).RFuture<Map<StreamMessageId,Map<K,V>>>
rangeReversedAsync(int count, StreamMessageId startId, StreamMessageId endId)
Returns stream data in reverse order in range by specified start Stream ID (included) and end Stream ID (included).RFuture<Map<StreamMessageId,Map<K,V>>>
rangeReversedAsync(StreamMessageId startId, StreamMessageId endId)
Returns stream data in reverse order in range by specified start Stream ID (included) and end Stream ID (included).Map<StreamMessageId,Map<K,V>>
read(int count, long timeout, TimeUnit unit, StreamMessageId... ids)
Map<String,Map<StreamMessageId,Map<K,V>>>
read(int count, long timeout, TimeUnit unit, StreamMessageId id, String key2, StreamMessageId id2)
Map<String,Map<StreamMessageId,Map<K,V>>>
read(int count, long timeout, TimeUnit unit, StreamMessageId id, String key2, StreamMessageId id2, String key3, StreamMessageId id3)
Map<String,Map<StreamMessageId,Map<K,V>>>
read(int count, long timeout, TimeUnit unit, StreamMessageId id, Map<String,StreamMessageId> keyToId)
Map<StreamMessageId,Map<K,V>>
read(int count, StreamMessageId... ids)
Map<String,Map<StreamMessageId,Map<K,V>>>
read(int count, StreamMessageId id, String key2, StreamMessageId id2)
Map<String,Map<StreamMessageId,Map<K,V>>>
read(int count, StreamMessageId id, String key2, StreamMessageId id2, String key3, StreamMessageId id3)
Map<String,Map<StreamMessageId,Map<K,V>>>
read(int count, StreamMessageId id, Map<String,StreamMessageId> keyToId)
Map<StreamMessageId,Map<K,V>>
read(long timeout, TimeUnit unit, StreamMessageId... ids)
Map<String,Map<StreamMessageId,Map<K,V>>>
read(long timeout, TimeUnit unit, StreamMessageId id, String key2, StreamMessageId id2)
Map<String,Map<StreamMessageId,Map<K,V>>>
read(long timeout, TimeUnit unit, StreamMessageId id, String key2, StreamMessageId id2, String key3, StreamMessageId id3)
Map<String,Map<StreamMessageId,Map<K,V>>>
read(long timeout, TimeUnit unit, StreamMessageId id, Map<String,StreamMessageId> keyToId)
Map<String,Map<StreamMessageId,Map<K,V>>>
read(StreamMultiReadArgs args)
Read stream data from multiple streams including current.Map<StreamMessageId,Map<K,V>>
read(StreamReadArgs args)
Read stream data from current stream only.Map<StreamMessageId,Map<K,V>>
read(StreamMessageId... ids)
Map<String,Map<StreamMessageId,Map<K,V>>>
read(StreamMessageId id, String key2, StreamMessageId id2)
Map<String,Map<StreamMessageId,Map<K,V>>>
read(StreamMessageId id, String key2, StreamMessageId id2, String key3, StreamMessageId id3)
Map<String,Map<StreamMessageId,Map<K,V>>>
read(StreamMessageId id, Map<String,StreamMessageId> keyToId)
RFuture<Map<StreamMessageId,Map<K,V>>>
readAsync(int count, long timeout, TimeUnit unit, StreamMessageId... ids)
RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>>
readAsync(int count, long timeout, TimeUnit unit, StreamMessageId id, String key2, StreamMessageId id2)
RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>>
readAsync(int count, long timeout, TimeUnit unit, StreamMessageId id, String key2, StreamMessageId id2, String key3, StreamMessageId id3)
RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>>
readAsync(int count, long timeout, TimeUnit unit, StreamMessageId id, Map<String,StreamMessageId> keyToId)
RFuture<Map<StreamMessageId,Map<K,V>>>
readAsync(int count, StreamMessageId... ids)
RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>>
readAsync(int count, StreamMessageId id, String key2, StreamMessageId id2)
RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>>
readAsync(int count, StreamMessageId id, String key2, StreamMessageId id2, String key3, StreamMessageId id3)
RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>>
readAsync(int count, StreamMessageId id, Map<String,StreamMessageId> keyToId)
RFuture<Map<StreamMessageId,Map<K,V>>>
readAsync(long timeout, TimeUnit unit, StreamMessageId... ids)
RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>>
readAsync(long timeout, TimeUnit unit, StreamMessageId id, String key2, StreamMessageId id2)
RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>>
readAsync(long timeout, TimeUnit unit, StreamMessageId id, String key2, StreamMessageId id2, String key3, StreamMessageId id3)
RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>>
readAsync(long timeout, TimeUnit unit, StreamMessageId id, Map<String,StreamMessageId> keyToId)
RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>>
readAsync(StreamMultiReadArgs args)
Read stream data from multiple streams including current.RFuture<Map<StreamMessageId,Map<K,V>>>
readAsync(StreamReadArgs args)
Read stream data from current stream only.RFuture<Map<StreamMessageId,Map<K,V>>>
readAsync(StreamMessageId... ids)
RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>>
readAsync(StreamMessageId id, String key2, StreamMessageId id2)
RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>>
readAsync(StreamMessageId id, String key2, StreamMessageId id2, String key3, StreamMessageId id3)
RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>>
readAsync(StreamMessageId id, Map<String,StreamMessageId> keyToId)
Map<StreamMessageId,Map<K,V>>
readGroup(String groupName, String consumerName, int count, long timeout, TimeUnit unit, StreamMessageId... ids)
Map<String,Map<StreamMessageId,Map<K,V>>>
readGroup(String groupName, String consumerName, int count, long timeout, TimeUnit unit, StreamMessageId id, String key2, StreamMessageId id2)
Map<String,Map<StreamMessageId,Map<K,V>>>
readGroup(String groupName, String consumerName, int count, long timeout, TimeUnit unit, StreamMessageId id, String key2, StreamMessageId id2, String key3, StreamMessageId id3)
Map<String,Map<StreamMessageId,Map<K,V>>>
readGroup(String groupName, String consumerName, int count, long timeout, TimeUnit unit, StreamMessageId id, Map<String,StreamMessageId> keyToId)
Map<StreamMessageId,Map<K,V>>
readGroup(String groupName, String consumerName, int count, StreamMessageId... ids)
Map<String,Map<StreamMessageId,Map<K,V>>>
readGroup(String groupName, String consumerName, int count, StreamMessageId id, String key2, StreamMessageId id2)
Map<String,Map<StreamMessageId,Map<K,V>>>
readGroup(String groupName, String consumerName, int count, StreamMessageId id, String key2, StreamMessageId id2, String key3, StreamMessageId id3)
Map<String,Map<StreamMessageId,Map<K,V>>>
readGroup(String groupName, String consumerName, int count, StreamMessageId id, Map<String,StreamMessageId> keyToId)
Map<StreamMessageId,Map<K,V>>
readGroup(String groupName, String consumerName, long timeout, TimeUnit unit, StreamMessageId... ids)
Map<String,Map<StreamMessageId,Map<K,V>>>
readGroup(String groupName, String consumerName, long timeout, TimeUnit unit, StreamMessageId id, String key2, StreamMessageId id2)
Map<String,Map<StreamMessageId,Map<K,V>>>
readGroup(String groupName, String consumerName, long timeout, TimeUnit unit, StreamMessageId id, String key2, StreamMessageId id2, String key3, StreamMessageId id3)
Map<String,Map<StreamMessageId,Map<K,V>>>
readGroup(String groupName, String consumerName, long timeout, TimeUnit unit, StreamMessageId id, Map<String,StreamMessageId> keyToId)
Map<String,Map<StreamMessageId,Map<K,V>>>
readGroup(String groupName, String consumerName, StreamMultiReadGroupArgs args)
Read stream data from consumer group and multiple streams including current.Map<StreamMessageId,Map<K,V>>
readGroup(String groupName, String consumerName, StreamReadGroupArgs args)
Read stream data from consumer group and current stream only.Map<StreamMessageId,Map<K,V>>
readGroup(String groupName, String consumerName, StreamMessageId... ids)
Map<String,Map<StreamMessageId,Map<K,V>>>
readGroup(String groupName, String consumerName, StreamMessageId id, String key2, StreamMessageId id2)
Map<String,Map<StreamMessageId,Map<K,V>>>
readGroup(String groupName, String consumerName, StreamMessageId id, String key2, StreamMessageId id2, String key3, StreamMessageId id3)
Map<String,Map<StreamMessageId,Map<K,V>>>
readGroup(String groupName, String consumerName, StreamMessageId id, Map<String,StreamMessageId> keyToId)
RFuture<Map<StreamMessageId,Map<K,V>>>
readGroupAsync(String groupName, String consumerName, int count, long timeout, TimeUnit unit, StreamMessageId... ids)
Read stream data fromgroupName
byconsumerName
and specified collection of Stream IDs.RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>>
readGroupAsync(String groupName, String consumerName, int count, long timeout, TimeUnit unit, StreamMessageId id, String key2, StreamMessageId id2)
Read stream data fromgroupName
byconsumerName
, starting by specified message ids for this and other streams.RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>>
readGroupAsync(String groupName, String consumerName, int count, long timeout, TimeUnit unit, StreamMessageId id, String key2, StreamMessageId id2, String key3, StreamMessageId id3)
Read stream data fromgroupName
byconsumerName
, starting by specified message ids for this and other streams.RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>>
readGroupAsync(String groupName, String consumerName, int count, long timeout, TimeUnit unit, StreamMessageId id, Map<String,StreamMessageId> keyToId)
RFuture<Map<StreamMessageId,Map<K,V>>>
readGroupAsync(String groupName, String consumerName, int count, StreamMessageId... ids)
Read stream data fromgroupName
byconsumerName
and specified collection of Stream IDs.RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>>
readGroupAsync(String groupName, String consumerName, int count, StreamMessageId id, String key2, StreamMessageId id2)
Read stream data fromgroupName
byconsumerName
, starting by specified message ids for this and other streams.RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>>
readGroupAsync(String groupName, String consumerName, int count, StreamMessageId id, String key2, StreamMessageId id2, String key3, StreamMessageId id3)
Read stream data fromgroupName
byconsumerName
, starting by specified message ids for this and other streams.RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>>
readGroupAsync(String groupName, String consumerName, int count, StreamMessageId id, Map<String,StreamMessageId> keyToId)
Read stream data fromgroupName
byconsumerName
, starting by specified message ids for this and other streams.RFuture<Map<StreamMessageId,Map<K,V>>>
readGroupAsync(String groupName, String consumerName, long timeout, TimeUnit unit, StreamMessageId... ids)
Read stream data fromgroupName
byconsumerName
and specified collection of Stream IDs.RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>>
readGroupAsync(String groupName, String consumerName, long timeout, TimeUnit unit, StreamMessageId id, String key2, StreamMessageId id2)
Read stream data fromgroupName
byconsumerName
, starting by specified message ids for this and other streams.RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>>
readGroupAsync(String groupName, String consumerName, long timeout, TimeUnit unit, StreamMessageId id, String key2, StreamMessageId id2, String key3, StreamMessageId id3)
Read stream data fromgroupName
byconsumerName
, starting by specified message ids for this and other streams.RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>>
readGroupAsync(String groupName, String consumerName, long timeout, TimeUnit unit, StreamMessageId id, Map<String,StreamMessageId> keyToId)
Read stream data fromgroupName
byconsumerName
, starting by specified message ids for this and other streams.RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>>
readGroupAsync(String groupName, String consumerName, StreamMultiReadGroupArgs args)
Read stream data from consumer group and multiple streams including current.RFuture<Map<StreamMessageId,Map<K,V>>>
readGroupAsync(String groupName, String consumerName, StreamReadGroupArgs args)
Read stream data from consumer group and current stream only.RFuture<Map<StreamMessageId,Map<K,V>>>
readGroupAsync(String groupName, String consumerName, StreamMessageId... ids)
Read stream data fromgroupName
byconsumerName
and specified collection of Stream IDs.RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>>
readGroupAsync(String groupName, String consumerName, StreamMessageId id, String key2, StreamMessageId id2)
Read stream data fromgroupName
byconsumerName
, starting by specified message ids for this and other streams.RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>>
readGroupAsync(String groupName, String consumerName, StreamMessageId id, String key2, StreamMessageId id2, String key3, StreamMessageId id3)
Read stream data fromgroupName
byconsumerName
, starting by specified message ids for this and other streams.RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>>
readGroupAsync(String groupName, String consumerName, StreamMessageId id, Map<String,StreamMessageId> keyToId)
Read stream data fromgroupName
byconsumerName
, starting by specified message ids for this and other streams.long
remainTimeToLive()
Remaining time to live of Redisson object that has a timeoutRFuture<Long>
remainTimeToLiveAsync()
Remaining time to live of Redisson object that has a timeoutlong
remove(StreamMessageId... ids)
Removes messages by id.RFuture<Long>
removeAsync(StreamMessageId... ids)
Removes messages by id.long
removeConsumer(String groupName, String consumerName)
Removes consumer of the group by name.RFuture<Long>
removeConsumerAsync(String groupName, String consumerName)
Removes consumer of the group by name.void
removeGroup(String groupName)
Removes group by name.RFuture<Void>
removeGroupAsync(String groupName)
Removes group by name.long
size()
Returns number of entries in streamRFuture<Long>
sizeAsync()
Returns number of entries in streamlong
trim(int count)
long
trim(StreamTrimArgs args)
Trims stream using strict trimming.long
trim(TrimStrategy strategy, int threshold)
RFuture<Long>
trimAsync(int count)
Trims stream using MAXLEN strategy to specified sizeRFuture<Long>
trimAsync(StreamTrimArgs args)
RFuture<Long>
trimAsync(TrimStrategy strategy, int threshold)
Trims stream to specified sizelong
trimNonStrict(int count)
long
trimNonStrict(StreamTrimArgs args)
Trims stream using non-strict trimming.long
trimNonStrict(TrimStrategy strategy, int threshold)
long
trimNonStrict(TrimStrategy strategy, int threshold, int limit)
Trims stream using almost exact trimming threshold up to limit.RFuture<Long>
trimNonStrictAsync(int count)
Trims stream using MAXLEN strategy to almost exact trimming threshold.RFuture<Long>
trimNonStrictAsync(StreamTrimArgs args)
RFuture<Long>
trimNonStrictAsync(TrimStrategy strategy, int threshold)
Trims stream using almost exact trimming threshold.RFuture<Long>
trimNonStrictAsync(TrimStrategy strategy, int threshold, int limit)
Trims stream using almost exact trimming threshold up to limit.void
updateGroupMessageId(String groupName, StreamMessageId id)
Updates next message id delivered to consumers.RFuture<Void>
updateGroupMessageIdAsync(String groupName, StreamMessageId id)
Updates next message id delivered to consumers.-
Methods inherited from class org.redisson.RedissonObject
addListener, addListener, addListenerAsync, addListenerAsync, copy, copyAsync, delete, deleteAsync, deleteAsync, dump, dumpAsync, encode, encode, encode, encode, encodeMapKey, encodeMapKeys, encodeMapValue, encodeMapValues, get, getCodec, getIdleTime, getIdleTimeAsync, getLockByMapKey, getLockByValue, getName, getRawName, getRawName, isExists, isExistsAsync, migrate, migrateAsync, move, moveAsync, prefixName, removeListener, removeListenerAsync, removeListenersAsync, rename, renameAsync, renamenx, renamenxAsync, restore, restore, restoreAndReplace, restoreAndReplace, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, setName, sizeInMemory, sizeInMemoryAsync, sizeInMemoryAsync, sizeInMemoryAsync, suffixName, toSeconds, toStream, touch, touchAsync, unlink, unlinkAsync
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.redisson.api.RExpirable
clearExpire, expire, expire, expireAt, expireAt, remainTimeToLive
-
Methods inherited from interface org.redisson.api.RExpirableAsync
clearExpireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsync
-
Methods inherited from interface org.redisson.api.RObject
addListener, copy, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlink
-
Methods inherited from interface org.redisson.api.RObjectAsync
addListenerAsync, copyAsync, deleteAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsync
-
-
-
-
Constructor Detail
-
RedissonStream
public RedissonStream(Codec codec, CommandAsyncExecutor connectionManager, String name)
-
RedissonStream
public RedissonStream(CommandAsyncExecutor connectionManager, String name)
-
-
Method Detail
-
checkKey
protected void checkKey(Object key)
-
checkValue
protected void checkValue(Object value)
-
createGroup
public void createGroup(String groupName)
Description copied from interface:RStream
Creates consumer group by name. Only new messages will be available for consumers of this group.- Specified by:
createGroup
in interfaceRStream<K,V>
- Parameters:
groupName
- - name of group
-
createGroupAsync
public RFuture<Void> createGroupAsync(String groupName)
Description copied from interface:RStreamAsync
Creates consumer group by name.- Specified by:
createGroupAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of group- Returns:
- void
-
createGroup
public void createGroup(String groupName, StreamMessageId id)
Description copied from interface:RStream
Creates consumer group by name and Stream Message ID. Only new messages after defined streamid
will be available for consumers of this group.StreamMessageId.NEWEST
is used for messages arrived since the moment of group creationStreamMessageId.ALL
is used for all messages added before and after the moment of group creation- Specified by:
createGroup
in interfaceRStream<K,V>
- Parameters:
groupName
- - name of groupid
- - Stream Message ID
-
createGroupAsync
public RFuture<Void> createGroupAsync(String groupName, StreamMessageId id)
Description copied from interface:RStreamAsync
Creates consumer group by name and stream id. Only new messages after defined streamid
will be available for consumers of this group.StreamMessageId.NEWEST
is used for messages arrived since the moment of group creating- Specified by:
createGroupAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of groupid
- - stream id- Returns:
- void
-
ackAsync
public RFuture<Long> ackAsync(String groupName, StreamMessageId... ids)
Description copied from interface:RStreamAsync
Marks pending messages by group name and streamids
as correctly processed.- Specified by:
ackAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of groupids
- - stream ids- Returns:
- marked messages amount
-
ack
public long ack(String groupName, StreamMessageId... id)
Description copied from interface:RStream
Marks pending messages by group name and streamids
as correctly processed.
-
getPendingInfoAsync
public RFuture<PendingResult> getPendingInfoAsync(String groupName)
Description copied from interface:RStreamAsync
Returns common info about pending messages by group name.- Specified by:
getPendingInfoAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of group- Returns:
- result object
-
getPendingInfo
public PendingResult getPendingInfo(String groupName)
Description copied from interface:RStream
Returns common info about pending messages by group name.- Specified by:
getPendingInfo
in interfaceRStream<K,V>
- Parameters:
groupName
- - name of group- Returns:
- result object
-
listPendingAsync
public RFuture<List<PendingEntry>> listPendingAsync(String groupName, String consumerName, StreamMessageId startId, StreamMessageId endId, int count)
Description copied from interface:RStreamAsync
Returns list of common info about pending messages by group and consumer name. Limited by start Stream Message ID and end Stream Message ID and count.StreamMessageId.MAX
is used as max Stream Message IDStreamMessageId.MIN
is used as min Stream Message ID- Specified by:
listPendingAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of groupconsumerName
- - name of consumerstartId
- - start Stream Message IDendId
- - end Stream Message IDcount
- - amount of messages- Returns:
- list
- See Also:
RStreamAsync.pendingRangeAsync(java.lang.String, org.redisson.api.StreamMessageId, org.redisson.api.StreamMessageId, int)
-
listPendingAsync
public RFuture<List<PendingEntry>> listPendingAsync(String groupName, StreamMessageId startId, StreamMessageId endId, int count)
Description copied from interface:RStreamAsync
Returns list of common info about pending messages by group name. Limited by start Stream Message ID and end Stream Message ID and count.StreamMessageId.MAX
is used as max Stream Message IDStreamMessageId.MIN
is used as min Stream Message ID- Specified by:
listPendingAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of groupstartId
- - start Stream Message IDendId
- - end Stream Message IDcount
- - amount of messages- Returns:
- list
- See Also:
RStreamAsync.pendingRangeAsync(java.lang.String, org.redisson.api.StreamMessageId, org.redisson.api.StreamMessageId, int)
-
listPendingAsync
public RFuture<List<PendingEntry>> listPendingAsync(String groupName, StreamMessageId startId, StreamMessageId endId, long idleTime, TimeUnit idleTimeUnit, int count)
Description copied from interface:RStreamAsync
Returns list of common info about pending messages by group name. Limited by minimum idle time, messages count, start and end Stream Message IDs.StreamMessageId.MAX
is used as max Stream Message IDStreamMessageId.MIN
is used as min Stream Message IDRequires Redis 6.2.0 and higher.
- Specified by:
listPendingAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of groupstartId
- - start Stream Message IDendId
- - end Stream Message IDidleTime
- - minimum idle time of messagesidleTimeUnit
- - idle time unitcount
- - amount of messages- Returns:
- list
- See Also:
RStreamAsync.pendingRangeAsync(java.lang.String, org.redisson.api.StreamMessageId, org.redisson.api.StreamMessageId, int)
-
listPendingAsync
public RFuture<List<PendingEntry>> listPendingAsync(String groupName, String consumerName, StreamMessageId startId, StreamMessageId endId, long idleTime, TimeUnit idleTimeUnit, int count)
Description copied from interface:RStreamAsync
Returns list of common info about pending messages by group and consumer name. Limited by minimum idle time, messages count, start and end Stream Message IDs.StreamMessageId.MAX
is used as max Stream Message IDStreamMessageId.MIN
is used as min Stream Message IDRequires Redis 6.2.0 and higher.
- Specified by:
listPendingAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of groupconsumerName
- - name of consumerstartId
- - start Stream Message IDendId
- - end Stream Message IDidleTime
- - minimum idle time of messagesidleTimeUnit
- - idle time unitcount
- - amount of messages- Returns:
- list
- See Also:
RStreamAsync.pendingRangeAsync(java.lang.String, org.redisson.api.StreamMessageId, org.redisson.api.StreamMessageId, int)
-
listPending
public List<PendingEntry> listPending(String groupName, StreamMessageId startId, StreamMessageId endId, int count)
Description copied from interface:RStream
Returns list of common info about pending messages by group name. Limited by start Stream Message ID and end Stream Message ID and count.StreamMessageId.MAX
is used as max Stream Message IDStreamMessageId.MIN
is used as min Stream Message ID- Specified by:
listPending
in interfaceRStream<K,V>
- Parameters:
groupName
- - name of groupstartId
- - start Stream Message IDendId
- - end Stream Message IDcount
- - amount of messages- Returns:
- list
- See Also:
RStreamAsync.pendingRangeAsync(java.lang.String, org.redisson.api.StreamMessageId, org.redisson.api.StreamMessageId, int)
-
listPending
public List<PendingEntry> listPending(String groupName, String consumerName, StreamMessageId startId, StreamMessageId endId, int count)
Description copied from interface:RStream
Returns list of common info about pending messages by group and consumer name. Limited by start Stream Message ID and end Stream Message ID and count.StreamMessageId.MAX
is used as max Stream Message IDStreamMessageId.MIN
is used as min Stream Message ID- Specified by:
listPending
in interfaceRStream<K,V>
- Parameters:
groupName
- - name of groupconsumerName
- - name of consumerstartId
- - start Stream Message IDendId
- - end Stream Message IDcount
- - amount of messages- Returns:
- list
- See Also:
RStreamAsync.pendingRangeAsync(java.lang.String, org.redisson.api.StreamMessageId, org.redisson.api.StreamMessageId, int)
-
listPending
public List<PendingEntry> listPending(String groupName, StreamMessageId startId, StreamMessageId endId, long idleTime, TimeUnit idleTimeUnit, int count)
Description copied from interface:RStream
Returns stream data of pending messages by group name. Limited by minimum idle time, messages count, start and end Stream Message IDs.StreamMessageId.MAX
is used as max Stream Message IDStreamMessageId.MIN
is used as min Stream Message IDRequires Redis 6.2.0 and higher.
- Specified by:
listPending
in interfaceRStream<K,V>
- Parameters:
groupName
- - name of groupstartId
- - start Stream Message IDendId
- - end Stream Message IDidleTime
- - minimum idle time of messagesidleTimeUnit
- - idle time unitcount
- - amount of messages- Returns:
- map
- See Also:
RStreamAsync.listPendingAsync(java.lang.String, org.redisson.api.StreamMessageId, org.redisson.api.StreamMessageId, long, java.util.concurrent.TimeUnit, int)
-
listPending
public List<PendingEntry> listPending(String groupName, String consumerName, StreamMessageId startId, StreamMessageId endId, long idleTime, TimeUnit idleTimeUnit, int count)
Description copied from interface:RStream
Returns stream data of pending messages by group and customer name. Limited by minimum idle time, messages count, start and end Stream Message IDs.StreamMessageId.MAX
is used as max Stream Message IDStreamMessageId.MIN
is used as min Stream Message IDRequires Redis 6.2.0 and higher.
- Specified by:
listPending
in interfaceRStream<K,V>
- Parameters:
groupName
- - name of groupconsumerName
- - name of consumerstartId
- - start Stream Message IDendId
- - end Stream Message IDidleTime
- - minimum idle time of messagesidleTimeUnit
- - idle time unitcount
- - amount of messages- Returns:
- map
- See Also:
RStreamAsync.listPendingAsync(java.lang.String, org.redisson.api.StreamMessageId, org.redisson.api.StreamMessageId, long, java.util.concurrent.TimeUnit, int)
-
fastClaim
public List<StreamMessageId> fastClaim(String groupName, String consumerName, long idleTime, TimeUnit idleTimeUnit, StreamMessageId... ids)
Description copied from interface:RStream
Transfers ownership of pending messages by id to a new consumer by name if idle time of messages is greater than defined value.
-
fastClaimAsync
public RFuture<List<StreamMessageId>> fastClaimAsync(String groupName, String consumerName, long idleTime, TimeUnit idleTimeUnit, StreamMessageId... ids)
Description copied from interface:RStreamAsync
Transfers ownership of pending messages by id to a new consumer by name if idle time of messages is greater than defined value.- Specified by:
fastClaimAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of groupconsumerName
- - name of consumeridleTime
- - minimum idle time of messagesidleTimeUnit
- - idle time unitids
- - Stream Message IDs- Returns:
- list of Stream Message IDs
-
autoClaim
public AutoClaimResult<K,V> autoClaim(String groupName, String consumerName, long idleTime, TimeUnit idleTimeUnit, StreamMessageId startId, int count)
Description copied from interface:RStream
Transfers ownership of pending messages by id to a new consumer by name if idle time of messages and startId are greater than defined value.
-
autoClaimAsync
public RFuture<AutoClaimResult<K,V>> autoClaimAsync(String groupName, String consumerName, long idleTime, TimeUnit idleTimeUnit, StreamMessageId startId, int count)
Description copied from interface:RStreamAsync
Transfers ownership of pending messages by id to a new consumer by name if idle time of messages and startId are greater than defined value.- Specified by:
autoClaimAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of groupconsumerName
- - name of consumeridleTime
- - minimum idle time of messagesidleTimeUnit
- - idle time unitstartId
- - start Stream Message ID- Returns:
- stream data mapped by Stream ID
-
fastAutoClaim
public FastAutoClaimResult fastAutoClaim(String groupName, String consumerName, long idleTime, TimeUnit idleTimeUnit, StreamMessageId startId, int count)
Description copied from interface:RStream
Transfers ownership of pending messages by id to a new consumer by name if idle time of messages and startId are greater than defined value.- Specified by:
fastAutoClaim
in interfaceRStream<K,V>
- Parameters:
groupName
- - name of groupconsumerName
- - name of consumeridleTime
- - minimum idle time of messagesidleTimeUnit
- - idle time unitstartId
- - start Stream Message ID- Returns:
- list of Stream Message IDs
-
readGroup
public Map<String,Map<StreamMessageId,Map<K,V>>> readGroup(String groupName, String consumerName, StreamMultiReadGroupArgs args)
Description copied from interface:RStream
Read stream data from consumer group and multiple streams including current.Usage examples:
Map result = stream.read("group1", "consumer1", StreamMultiReadGroupArgs.greaterThan(id, "stream2", id2));
Map result = stream.read("group1", "consumer1", StreamMultiReadGroupArgs.greaterThan(id, "stream2", id2) .count(100) .timeout(Duration.ofSeconds(5))));
-
readGroup
public Map<StreamMessageId,Map<K,V>> readGroup(String groupName, String consumerName, StreamReadGroupArgs args)
Description copied from interface:RStream
Read stream data from consumer group and current stream only.Usage examples:
Map result = stream.read("group1", "consumer1", StreamReadGroupArgs.greaterThan(id));
Map result = stream.read("group1", "consumer1", StreamReadGroupArgs.greaterThan(id) .count(100) .timeout(Duration.ofSeconds(5))));
-
readGroupAsync
public RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>> readGroupAsync(String groupName, String consumerName, StreamMultiReadGroupArgs args)
Description copied from interface:RStreamAsync
Read stream data from consumer group and multiple streams including current.- Specified by:
readGroupAsync
in interfaceRStreamAsync<K,V>
args
- - method arguments object- Returns:
- stream data mapped by stream name and Stream Message ID
-
readGroupAsync
public RFuture<Map<StreamMessageId,Map<K,V>>> readGroupAsync(String groupName, String consumerName, StreamReadGroupArgs args)
Description copied from interface:RStreamAsync
Read stream data from consumer group and current stream only.- Specified by:
readGroupAsync
in interfaceRStreamAsync<K,V>
args
- - method arguments object- Returns:
- stream data mapped by Stream Message ID
-
fastAutoClaimAsync
public RFuture<FastAutoClaimResult> fastAutoClaimAsync(String groupName, String consumerName, long idleTime, TimeUnit idleTimeUnit, StreamMessageId startId, int count)
Description copied from interface:RStreamAsync
Transfers ownership of pending messages by id to a new consumer by name if idle time of messages and startId are greater than defined value.- Specified by:
fastAutoClaimAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of groupconsumerName
- - name of consumeridleTime
- - minimum idle time of messagesidleTimeUnit
- - idle time unitstartId
- - start Stream Message ID- Returns:
- list of Stream Message IDs
-
claimAsync
public RFuture<Map<StreamMessageId,Map<K,V>>> claimAsync(String groupName, String consumerName, long idleTime, TimeUnit idleTimeUnit, StreamMessageId... ids)
Description copied from interface:RStreamAsync
Transfers ownership of pending messages by id to a new consumer by name if idle time of messages is greater than defined value.- Specified by:
claimAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of groupconsumerName
- - name of consumeridleTime
- - minimum idle time of messagesidleTimeUnit
- - idle time unitids
- - Stream Message IDs- Returns:
- stream data mapped by Stream ID
-
claim
public Map<StreamMessageId,Map<K,V>> claim(String groupName, String consumerName, long idleTime, TimeUnit idleTimeUnit, StreamMessageId... ids)
Description copied from interface:RStream
Transfers ownership of pending messages by id to a new consumer by name if idle time of messages is greater than defined value.
-
readGroupAsync
public RFuture<Map<StreamMessageId,Map<K,V>>> readGroupAsync(String groupName, String consumerName, StreamMessageId... ids)
Description copied from interface:RStreamAsync
Read stream data fromgroupName
byconsumerName
and specified collection of Stream IDs.- Specified by:
readGroupAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of groupconsumerName
- - name of consumerids
- - collection of Stream IDs- Returns:
- stream data mapped by Stream ID
-
readGroupAsync
public RFuture<Map<StreamMessageId,Map<K,V>>> readGroupAsync(String groupName, String consumerName, int count, StreamMessageId... ids)
Description copied from interface:RStreamAsync
Read stream data fromgroupName
byconsumerName
and specified collection of Stream IDs.- Specified by:
readGroupAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of groupconsumerName
- - name of consumercount
- - stream data size limitids
- - collection of Stream IDs- Returns:
- stream data mapped by Stream ID
-
readGroupAsync
public RFuture<Map<StreamMessageId,Map<K,V>>> readGroupAsync(String groupName, String consumerName, long timeout, TimeUnit unit, StreamMessageId... ids)
Description copied from interface:RStreamAsync
Read stream data fromgroupName
byconsumerName
and specified collection of Stream IDs. Wait for stream data availability for specifiedtimeout
interval.- Specified by:
readGroupAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of groupconsumerName
- - name of consumertimeout
- - time interval to wait for stream data availabilityunit
- - time interval unitids
- - collection of Stream IDs- Returns:
- stream data mapped by Stream ID
-
readGroupAsync
public RFuture<Map<StreamMessageId,Map<K,V>>> readGroupAsync(String groupName, String consumerName, int count, long timeout, TimeUnit unit, StreamMessageId... ids)
Description copied from interface:RStreamAsync
Read stream data fromgroupName
byconsumerName
and specified collection of Stream IDs. Wait for stream data availability for specifiedtimeout
interval.- Specified by:
readGroupAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of groupconsumerName
- - name of consumercount
- - stream data size limittimeout
- - time interval to wait for stream data availabilityunit
- - time interval unitids
- - collection of Stream IDs- Returns:
- stream data mapped by Stream ID
-
readGroup
public Map<String,Map<StreamMessageId,Map<K,V>>> readGroup(String groupName, String consumerName, StreamMessageId id, Map<String,StreamMessageId> keyToId)
-
readGroupAsync
public RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>> readGroupAsync(String groupName, String consumerName, StreamMessageId id, Map<String,StreamMessageId> keyToId)
Description copied from interface:RStreamAsync
Read stream data fromgroupName
byconsumerName
, starting by specified message ids for this and other streams.- Specified by:
readGroupAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of groupconsumerName
- - name of consumerid
- - starting message id for this streamkeyToId
- - Stream Message ID mapped by stream name- Returns:
- stream data mapped by key and Stream Message ID
-
readGroup
public Map<String,Map<StreamMessageId,Map<K,V>>> readGroup(String groupName, String consumerName, int count, StreamMessageId id, Map<String,StreamMessageId> keyToId)
-
readGroupAsync
public RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>> readGroupAsync(String groupName, String consumerName, int count, StreamMessageId id, Map<String,StreamMessageId> keyToId)
Description copied from interface:RStreamAsync
Read stream data fromgroupName
byconsumerName
, starting by specified message ids for this and other streams.- Specified by:
readGroupAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of groupconsumerName
- - name of consumercount
- - stream data size limitid
- - starting message id for this streamkeyToId
- - Stream Message ID mapped by stream name- Returns:
- stream data mapped by key and Stream Message ID
-
readGroupAsync
public RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>> readGroupAsync(String groupName, String consumerName, int count, long timeout, TimeUnit unit, StreamMessageId id, String key2, StreamMessageId id2)
Description copied from interface:RStreamAsync
Read stream data fromgroupName
byconsumerName
, starting by specified message ids for this and other streams. Waits for the first stream data availability for specifiedtimeout
interval.- Specified by:
readGroupAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of groupconsumerName
- - name of consumercount
- - stream data size limittimeout
- - time interval to wait for stream data availabilityunit
- - time interval unitid
- - starting message id for this streamkey2
- - name of second streamid2
- - starting message id for second stream- Returns:
- stream data mapped by key and Stream Message ID
-
readGroupAsync
public RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>> readGroupAsync(String groupName, String consumerName, int count, long timeout, TimeUnit unit, StreamMessageId id, String key2, StreamMessageId id2, String key3, StreamMessageId id3)
Description copied from interface:RStreamAsync
Read stream data fromgroupName
byconsumerName
, starting by specified message ids for this and other streams. Waits for the first stream data availability for specifiedtimeout
interval.- Specified by:
readGroupAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of groupconsumerName
- - name of consumercount
- - stream data size limittimeout
- - time interval to wait for stream data availabilityunit
- - time interval unitid
- - starting message id for this streamkey2
- - name of second streamid2
- - starting message id for second streamkey3
- - name of third streamid3
- - starting message id for third stream- Returns:
- stream data mapped by key and Stream Message ID
-
readGroupAsync
public RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>> readGroupAsync(String groupName, String consumerName, long timeout, TimeUnit unit, StreamMessageId id, Map<String,StreamMessageId> keyToId)
Description copied from interface:RStreamAsync
Read stream data fromgroupName
byconsumerName
, starting by specified message ids for this and other streams. Waits for the first stream data availability for specifiedtimeout
interval.- Specified by:
readGroupAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of groupconsumerName
- - name of consumertimeout
- - time interval to wait for stream data availabilityunit
- - time interval unitid
- - starting message id for this streamkeyToId
- - Stream Message ID mapped by stream name- Returns:
- stream data mapped by key and Stream Message ID
-
readGroup
public Map<String,Map<StreamMessageId,Map<K,V>>> readGroup(String groupName, String consumerName, int count, long timeout, TimeUnit unit, StreamMessageId id, Map<String,StreamMessageId> keyToId)
-
readGroup
public Map<String,Map<StreamMessageId,Map<K,V>>> readGroup(String groupName, String consumerName, long timeout, TimeUnit unit, StreamMessageId id, Map<String,StreamMessageId> keyToId)
-
readGroupAsync
public RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>> readGroupAsync(String groupName, String consumerName, StreamMessageId id, String key2, StreamMessageId id2)
Description copied from interface:RStreamAsync
Read stream data fromgroupName
byconsumerName
, starting by specified message ids for this and other streams.- Specified by:
readGroupAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of groupconsumerName
- - name of consumerid
- - starting message id for this streamkey2
- - name of second streamid2
- - starting message id for second stream- Returns:
- stream data mapped by key and Stream Message ID
-
readGroupAsync
public RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>> readGroupAsync(String groupName, String consumerName, StreamMessageId id, String key2, StreamMessageId id2, String key3, StreamMessageId id3)
Description copied from interface:RStreamAsync
Read stream data fromgroupName
byconsumerName
, starting by specified message ids for this and other streams.- Specified by:
readGroupAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of groupconsumerName
- - name of consumerid
- - starting message id for this streamkey2
- - name of second streamid2
- - starting message id for second streamkey3
- - name of third streamid3
- - starting message id for third stream- Returns:
- stream data mapped by key and Stream Message ID
-
readGroupAsync
public RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>> readGroupAsync(String groupName, String consumerName, int count, StreamMessageId id, String key2, StreamMessageId id2)
Description copied from interface:RStreamAsync
Read stream data fromgroupName
byconsumerName
, starting by specified message ids for this and other streams.- Specified by:
readGroupAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of groupconsumerName
- - name of consumercount
- - stream data size limitid
- - starting message id for this streamkey2
- - name of second streamid2
- - starting message id for second stream- Returns:
- stream data mapped by key and Stream Message ID
-
readGroupAsync
public RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>> readGroupAsync(String groupName, String consumerName, int count, StreamMessageId id, String key2, StreamMessageId id2, String key3, StreamMessageId id3)
Description copied from interface:RStreamAsync
Read stream data fromgroupName
byconsumerName
, starting by specified message ids for this and other streams.- Specified by:
readGroupAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of groupconsumerName
- - name of consumercount
- - stream data size limitid
- - starting message id for this streamkey2
- - name of second streamid2
- - starting message id for second streamkey3
- - name of third streamid3
- - starting message id for third stream- Returns:
- stream data mapped by key and Stream Message ID
-
readGroupAsync
public RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>> readGroupAsync(String groupName, String consumerName, long timeout, TimeUnit unit, StreamMessageId id, String key2, StreamMessageId id2)
Description copied from interface:RStreamAsync
Read stream data fromgroupName
byconsumerName
, starting by specified message ids for this and other streams. Waits for the first stream data availability for specifiedtimeout
interval.- Specified by:
readGroupAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of groupconsumerName
- - name of consumertimeout
- - time interval to wait for stream data availabilityunit
- - time interval unitid
- - starting message id for this streamkey2
- - name of second streamid2
- - starting message id for second stream- Returns:
- stream data mapped by key and Stream Message ID
-
readGroupAsync
public RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>> readGroupAsync(String groupName, String consumerName, long timeout, TimeUnit unit, StreamMessageId id, String key2, StreamMessageId id2, String key3, StreamMessageId id3)
Description copied from interface:RStreamAsync
Read stream data fromgroupName
byconsumerName
, starting by specified message ids for this and other streams. Waits for the first stream data availability for specifiedtimeout
interval.- Specified by:
readGroupAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of groupconsumerName
- - name of consumertimeout
- - time interval to wait for stream data availabilityunit
- - time interval unitid
- - starting message id for this streamkey2
- - name of second streamid2
- - starting message id for second streamkey3
- - name of third streamid3
- - starting message id for third stream- Returns:
- stream data mapped by key and Stream Message ID
-
readGroup
public Map<String,Map<StreamMessageId,Map<K,V>>> readGroup(String groupName, String consumerName, StreamMessageId id, String key2, StreamMessageId id2)
-
readGroup
public Map<String,Map<StreamMessageId,Map<K,V>>> readGroup(String groupName, String consumerName, StreamMessageId id, String key2, StreamMessageId id2, String key3, StreamMessageId id3)
-
readGroup
public Map<String,Map<StreamMessageId,Map<K,V>>> readGroup(String groupName, String consumerName, int count, StreamMessageId id, String key2, StreamMessageId id2)
-
readGroup
public Map<String,Map<StreamMessageId,Map<K,V>>> readGroup(String groupName, String consumerName, int count, StreamMessageId id, String key2, StreamMessageId id2, String key3, StreamMessageId id3)
-
readGroup
public Map<String,Map<StreamMessageId,Map<K,V>>> readGroup(String groupName, String consumerName, long timeout, TimeUnit unit, StreamMessageId id, String key2, StreamMessageId id2)
-
readGroup
public Map<String,Map<StreamMessageId,Map<K,V>>> readGroup(String groupName, String consumerName, long timeout, TimeUnit unit, StreamMessageId id, String key2, StreamMessageId id2, String key3, StreamMessageId id3)
-
readGroup
public Map<String,Map<StreamMessageId,Map<K,V>>> readGroup(String groupName, String consumerName, int count, long timeout, TimeUnit unit, StreamMessageId id, String key2, StreamMessageId id2)
-
readGroup
public Map<String,Map<StreamMessageId,Map<K,V>>> readGroup(String groupName, String consumerName, int count, long timeout, TimeUnit unit, StreamMessageId id, String key2, StreamMessageId id2, String key3, StreamMessageId id3)
-
readGroupAsync
public RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>> readGroupAsync(String groupName, String consumerName, int count, long timeout, TimeUnit unit, StreamMessageId id, Map<String,StreamMessageId> keyToId)
-
readGroup
public Map<StreamMessageId,Map<K,V>> readGroup(String groupName, String consumerName, StreamMessageId... ids)
-
readGroup
public Map<StreamMessageId,Map<K,V>> readGroup(String groupName, String consumerName, int count, StreamMessageId... ids)
-
readGroup
public Map<StreamMessageId,Map<K,V>> readGroup(String groupName, String consumerName, long timeout, TimeUnit unit, StreamMessageId... ids)
-
readGroup
public Map<StreamMessageId,Map<K,V>> readGroup(String groupName, String consumerName, int count, long timeout, TimeUnit unit, StreamMessageId... ids)
-
addAll
public StreamMessageId addAll(Map<K,V> entries)
-
addAllAsync
public RFuture<StreamMessageId> addAllAsync(Map<K,V> entries)
- Specified by:
addAllAsync
in interfaceRStreamAsync<K,V>
-
addAll
public void addAll(StreamMessageId id, Map<K,V> entries)
-
addAllAsync
public RFuture<Void> addAllAsync(StreamMessageId id, Map<K,V> entries)
- Specified by:
addAllAsync
in interfaceRStreamAsync<K,V>
-
addAll
public StreamMessageId addAll(Map<K,V> entries, int trimLen, boolean trimStrict)
-
addAllAsync
public RFuture<StreamMessageId> addAllAsync(Map<K,V> entries, int trimLen, boolean trimStrict)
- Specified by:
addAllAsync
in interfaceRStreamAsync<K,V>
-
addAll
public void addAll(StreamMessageId id, Map<K,V> entries, int trimLen, boolean trimStrict)
-
addAllAsync
public RFuture<Void> addAllAsync(StreamMessageId id, Map<K,V> entries, int trimLen, boolean trimStrict)
- Specified by:
addAllAsync
in interfaceRStreamAsync<K,V>
-
size
public long size()
Description copied from interface:RStream
Returns number of entries in stream
-
sizeAsync
public RFuture<Long> sizeAsync()
Description copied from interface:RStreamAsync
Returns number of entries in stream- Specified by:
sizeAsync
in interfaceRStreamAsync<K,V>
- Returns:
- size of stream
-
read
public Map<String,Map<StreamMessageId,Map<K,V>>> read(StreamMultiReadArgs args)
Description copied from interface:RStream
Read stream data from multiple streams including current.Usage examples:
Map result = stream.read(StreamMultiReadArgs.greaterThan(id, "stream2", id2));
Map result = stream.read(StreamMultiReadArgs.greaterThan(id, "stream2", id2) .count(100) .timeout(Duration.ofSeconds(5))));
-
readAsync
public RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>> readAsync(StreamMultiReadArgs args)
Description copied from interface:RStreamAsync
Read stream data from multiple streams including current.- Specified by:
readAsync
in interfaceRStreamAsync<K,V>
- Parameters:
args
- - method arguments object- Returns:
- stream data mapped by stream name and Stream Message ID
-
read
public Map<StreamMessageId,Map<K,V>> read(StreamReadArgs args)
Description copied from interface:RStream
Read stream data from current stream only.Usage examples:
Map result = stream.read(StreamReadArgs.greaterThan(id));
Map result = stream.read(StreamReadArgs.greaterThan(id) .count(100) .timeout(Duration.ofSeconds(5))));
-
readAsync
public RFuture<Map<StreamMessageId,Map<K,V>>> readAsync(StreamReadArgs args)
Description copied from interface:RStreamAsync
Read stream data from current stream only.- Specified by:
readAsync
in interfaceRStreamAsync<K,V>
- Parameters:
args
- - method arguments object- Returns:
- stream data mapped by Stream Message ID
-
read
public Map<String,Map<StreamMessageId,Map<K,V>>> read(StreamMessageId id, Map<String,StreamMessageId> keyToId)
-
readAsync
public RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>> readAsync(StreamMessageId id, Map<String,StreamMessageId> keyToId)
- Specified by:
readAsync
in interfaceRStreamAsync<K,V>
-
read
public Map<String,Map<StreamMessageId,Map<K,V>>> read(int count, StreamMessageId id, Map<String,StreamMessageId> keyToId)
-
readAsync
public RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>> readAsync(int count, StreamMessageId id, Map<String,StreamMessageId> keyToId)
- Specified by:
readAsync
in interfaceRStreamAsync<K,V>
-
readAsync
public RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>> readAsync(int count, long timeout, TimeUnit unit, StreamMessageId id, String key2, StreamMessageId id2)
- Specified by:
readAsync
in interfaceRStreamAsync<K,V>
-
readAsync
public RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>> readAsync(int count, long timeout, TimeUnit unit, StreamMessageId id, String key2, StreamMessageId id2, String key3, StreamMessageId id3)
- Specified by:
readAsync
in interfaceRStreamAsync<K,V>
-
readAsync
public RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>> readAsync(long timeout, TimeUnit unit, StreamMessageId id, Map<String,StreamMessageId> keyToId)
- Specified by:
readAsync
in interfaceRStreamAsync<K,V>
-
read
public Map<String,Map<StreamMessageId,Map<K,V>>> read(int count, long timeout, TimeUnit unit, StreamMessageId id, Map<String,StreamMessageId> keyToId)
-
read
public Map<String,Map<StreamMessageId,Map<K,V>>> read(long timeout, TimeUnit unit, StreamMessageId id, Map<String,StreamMessageId> keyToId)
-
readAsync
public RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>> readAsync(StreamMessageId id, String key2, StreamMessageId id2)
- Specified by:
readAsync
in interfaceRStreamAsync<K,V>
-
readAsync
public RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>> readAsync(StreamMessageId id, String key2, StreamMessageId id2, String key3, StreamMessageId id3)
- Specified by:
readAsync
in interfaceRStreamAsync<K,V>
-
readAsync
public RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>> readAsync(int count, StreamMessageId id, String key2, StreamMessageId id2)
- Specified by:
readAsync
in interfaceRStreamAsync<K,V>
-
readAsync
public RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>> readAsync(int count, StreamMessageId id, String key2, StreamMessageId id2, String key3, StreamMessageId id3)
- Specified by:
readAsync
in interfaceRStreamAsync<K,V>
-
readAsync
public RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>> readAsync(long timeout, TimeUnit unit, StreamMessageId id, String key2, StreamMessageId id2)
- Specified by:
readAsync
in interfaceRStreamAsync<K,V>
-
readAsync
public RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>> readAsync(long timeout, TimeUnit unit, StreamMessageId id, String key2, StreamMessageId id2, String key3, StreamMessageId id3)
- Specified by:
readAsync
in interfaceRStreamAsync<K,V>
-
read
public Map<String,Map<StreamMessageId,Map<K,V>>> read(StreamMessageId id, String key2, StreamMessageId id2)
-
read
public Map<String,Map<StreamMessageId,Map<K,V>>> read(StreamMessageId id, String key2, StreamMessageId id2, String key3, StreamMessageId id3)
-
read
public Map<String,Map<StreamMessageId,Map<K,V>>> read(int count, StreamMessageId id, String key2, StreamMessageId id2)
-
read
public Map<String,Map<StreamMessageId,Map<K,V>>> read(int count, StreamMessageId id, String key2, StreamMessageId id2, String key3, StreamMessageId id3)
-
read
public Map<String,Map<StreamMessageId,Map<K,V>>> read(long timeout, TimeUnit unit, StreamMessageId id, String key2, StreamMessageId id2)
-
read
public Map<String,Map<StreamMessageId,Map<K,V>>> read(long timeout, TimeUnit unit, StreamMessageId id, String key2, StreamMessageId id2, String key3, StreamMessageId id3)
-
read
public Map<String,Map<StreamMessageId,Map<K,V>>> read(int count, long timeout, TimeUnit unit, StreamMessageId id, String key2, StreamMessageId id2)
-
read
public Map<String,Map<StreamMessageId,Map<K,V>>> read(int count, long timeout, TimeUnit unit, StreamMessageId id, String key2, StreamMessageId id2, String key3, StreamMessageId id3)
-
readAsync
public RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>> readAsync(int count, long timeout, TimeUnit unit, StreamMessageId id, Map<String,StreamMessageId> keyToId)
- Specified by:
readAsync
in interfaceRStreamAsync<K,V>
-
add
public StreamMessageId add(StreamAddArgs<K,V> args)
Description copied from interface:RStream
Appends a new entry/entries and returns generated Stream Message IDUsage examples:
StreamMessageId id = stream.add(StreamAddArgs.entry(15, 37));
StreamMessageId id = stream.add(StreamAddArgs.entries(15, 37, 23, 43) .trim(TrimStrategy.MAXLEN, 100)));
-
add
public void add(StreamMessageId id, StreamAddArgs<K,V> args)
Description copied from interface:RStream
Appends a new entry/entries by specified Stream Message IDUsage examples:
stream.add(id, StreamAddArgs.entry(15, 37));
stream.add(id, StreamAddArgs.entries(15, 37, 23, 43) .trim(TrimStrategy.MAXLEN, 100)));
-
addAsync
public RFuture<StreamMessageId> addAsync(StreamAddArgs<K,V> args)
Description copied from interface:RStreamAsync
Appends a new entry/entries and returns generated Stream Message ID- Specified by:
addAsync
in interfaceRStreamAsync<K,V>
- Parameters:
args
- - method arguments object- Returns:
- Stream Message ID
-
addAsync
public RFuture<Void> addAsync(StreamMessageId id, StreamAddArgs<K,V> args)
Description copied from interface:RStreamAsync
Appends a new entry/entries by specified Stream Message ID- Specified by:
addAsync
in interfaceRStreamAsync<K,V>
- Parameters:
id
- - Stream Message IDargs
- - method arguments object
-
addCustomAsync
public <R> RFuture<R> addCustomAsync(StreamMessageId id, StreamAddArgs<K,V> args)
-
addAsync
public RFuture<StreamMessageId> addAsync(K key, V value)
- Specified by:
addAsync
in interfaceRStreamAsync<K,V>
-
addAsync
public RFuture<Void> addAsync(StreamMessageId id, K key, V value)
- Specified by:
addAsync
in interfaceRStreamAsync<K,V>
-
addAsync
public RFuture<StreamMessageId> addAsync(K key, V value, int trimLen, boolean trimStrict)
- Specified by:
addAsync
in interfaceRStreamAsync<K,V>
-
addAsync
public RFuture<Void> addAsync(StreamMessageId id, K key, V value, int trimLen, boolean trimStrict)
- Specified by:
addAsync
in interfaceRStreamAsync<K,V>
-
add
public void add(StreamMessageId id, K key, V value)
-
add
public StreamMessageId add(K key, V value, int trimLen, boolean trimStrict)
-
add
public void add(StreamMessageId id, K key, V value, int trimLen, boolean trimStrict)
-
readAsync
public RFuture<Map<StreamMessageId,Map<K,V>>> readAsync(int count, StreamMessageId... ids)
- Specified by:
readAsync
in interfaceRStreamAsync<K,V>
-
read
public Map<StreamMessageId,Map<K,V>> read(int count, long timeout, TimeUnit unit, StreamMessageId... ids)
-
read
public Map<StreamMessageId,Map<K,V>> read(int count, StreamMessageId... ids)
-
readAsync
public RFuture<Map<StreamMessageId,Map<K,V>>> readAsync(int count, long timeout, TimeUnit unit, StreamMessageId... ids)
- Specified by:
readAsync
in interfaceRStreamAsync<K,V>
-
rangeAsync
public RFuture<Map<StreamMessageId,Map<K,V>>> rangeAsync(int count, StreamMessageId startId, StreamMessageId endId)
Description copied from interface:RStreamAsync
Returns stream data in range by specified start Stream ID (included) and end Stream ID (included).- Specified by:
rangeAsync
in interfaceRStreamAsync<K,V>
- Parameters:
count
- - stream data size limitstartId
- - start Stream IDendId
- - end Stream ID- Returns:
- stream data mapped by Stream ID
-
range
public Map<StreamMessageId,Map<K,V>> range(int count, StreamMessageId startId, StreamMessageId endId)
Description copied from interface:RStream
Returns stream data in range by specified start Stream Message ID (included) and end Stream Message ID (included).
-
rangeReversedAsync
public RFuture<Map<StreamMessageId,Map<K,V>>> rangeReversedAsync(int count, StreamMessageId startId, StreamMessageId endId)
Description copied from interface:RStreamAsync
Returns stream data in reverse order in range by specified start Stream ID (included) and end Stream ID (included).- Specified by:
rangeReversedAsync
in interfaceRStreamAsync<K,V>
- Parameters:
count
- - stream data size limitstartId
- - start Stream IDendId
- - end Stream ID- Returns:
- stream data mapped by Stream ID
-
rangeReversed
public Map<StreamMessageId,Map<K,V>> rangeReversed(int count, StreamMessageId startId, StreamMessageId endId)
Description copied from interface:RStream
Returns stream data in reverse order in range by specified start Stream Message ID (included) and end Stream Message ID (included).- Specified by:
rangeReversed
in interfaceRStream<K,V>
- Parameters:
count
- - stream data size limitstartId
- - start Stream Message IDendId
- - end Stream Message ID- Returns:
- stream data mapped by Stream Message ID
-
readAsync
public RFuture<Map<StreamMessageId,Map<K,V>>> readAsync(StreamMessageId... ids)
- Specified by:
readAsync
in interfaceRStreamAsync<K,V>
-
readAsync
public RFuture<Map<StreamMessageId,Map<K,V>>> readAsync(long timeout, TimeUnit unit, StreamMessageId... ids)
- Specified by:
readAsync
in interfaceRStreamAsync<K,V>
-
rangeAsync
public RFuture<Map<StreamMessageId,Map<K,V>>> rangeAsync(StreamMessageId startId, StreamMessageId endId)
Description copied from interface:RStreamAsync
Returns stream data in range by specified start Stream ID (included) and end Stream ID (included).- Specified by:
rangeAsync
in interfaceRStreamAsync<K,V>
- Parameters:
startId
- - start Stream IDendId
- - end Stream ID- Returns:
- stream data mapped by Stream ID
-
rangeReversedAsync
public RFuture<Map<StreamMessageId,Map<K,V>>> rangeReversedAsync(StreamMessageId startId, StreamMessageId endId)
Description copied from interface:RStreamAsync
Returns stream data in reverse order in range by specified start Stream ID (included) and end Stream ID (included).- Specified by:
rangeReversedAsync
in interfaceRStreamAsync<K,V>
- Parameters:
startId
- - start Stream IDendId
- - end Stream ID- Returns:
- stream data mapped by Stream ID
-
read
public Map<StreamMessageId,Map<K,V>> read(StreamMessageId... ids)
-
read
public Map<StreamMessageId,Map<K,V>> read(long timeout, TimeUnit unit, StreamMessageId... ids)
-
range
public Map<StreamMessageId,Map<K,V>> range(StreamMessageId startId, StreamMessageId endId)
Description copied from interface:RStream
Returns stream data in range by specified start Stream Message ID (included) and end Stream Message ID (included).
-
rangeReversed
public Map<StreamMessageId,Map<K,V>> rangeReversed(StreamMessageId startId, StreamMessageId endId)
Description copied from interface:RStream
Returns stream data in reverse order in range by specified start Stream Message ID (included) and end Stream Message ID (included).- Specified by:
rangeReversed
in interfaceRStream<K,V>
- Parameters:
startId
- - start Stream Message IDendId
- - end Stream Message ID- Returns:
- stream data mapped by Stream Message ID
-
removeAsync
public RFuture<Long> removeAsync(StreamMessageId... ids)
Description copied from interface:RStreamAsync
Removes messages by id.- Specified by:
removeAsync
in interfaceRStreamAsync<K,V>
- Parameters:
ids
- - id of messages to remove- Returns:
- deleted messages amount
-
remove
public long remove(StreamMessageId... ids)
Description copied from interface:RStream
Removes messages by id.
-
trim
public long trim(TrimStrategy strategy, int threshold)
-
trimNonStrict
public long trimNonStrict(TrimStrategy strategy, int threshold, int limit)
Description copied from interface:RStream
Trims stream using almost exact trimming threshold up to limit.- Specified by:
trimNonStrict
in interfaceRStream<K,V>
- Parameters:
strategy
- - trim strategythreshold
- - trim thresholdlimit
- - trim limit- Returns:
- number of deleted messages
-
trimAsync
public RFuture<Long> trimAsync(TrimStrategy strategy, int threshold)
Description copied from interface:RStreamAsync
Trims stream to specified size- Specified by:
trimAsync
in interfaceRStreamAsync<K,V>
- Parameters:
strategy
- - trim strategythreshold
- - new size of stream- Returns:
- number of deleted messages
-
trimNonStrictAsync
public RFuture<Long> trimNonStrictAsync(TrimStrategy strategy, int threshold, int limit)
Description copied from interface:RStreamAsync
Trims stream using almost exact trimming threshold up to limit.- Specified by:
trimNonStrictAsync
in interfaceRStreamAsync<K,V>
- Parameters:
strategy
- - trim strategythreshold
- - trim thresholdlimit
- - trim limit- Returns:
- number of deleted messages
-
trimNonStrict
public long trimNonStrict(TrimStrategy strategy, int threshold)
- Specified by:
trimNonStrict
in interfaceRStream<K,V>
-
trimNonStrictAsync
public RFuture<Long> trimNonStrictAsync(TrimStrategy strategy, int threshold)
Description copied from interface:RStreamAsync
Trims stream using almost exact trimming threshold.- Specified by:
trimNonStrictAsync
in interfaceRStreamAsync<K,V>
- Parameters:
strategy
- - trim strategythreshold
- - trim threshold- Returns:
- number of deleted messages
-
trimAsync
public RFuture<Long> trimAsync(int count)
Description copied from interface:RStreamAsync
Trims stream using MAXLEN strategy to specified size- Specified by:
trimAsync
in interfaceRStreamAsync<K,V>
- Parameters:
count
- - new size of stream- Returns:
- number of deleted messages
-
trimNonStrictAsync
public RFuture<Long> trimNonStrictAsync(int count)
Description copied from interface:RStreamAsync
Trims stream using MAXLEN strategy to almost exact trimming threshold.- Specified by:
trimNonStrictAsync
in interfaceRStreamAsync<K,V>
- Parameters:
count
- - new size of stream- Returns:
- number of deleted messages
-
trimNonStrict
public long trimNonStrict(int count)
- Specified by:
trimNonStrict
in interfaceRStream<K,V>
-
removeGroupAsync
public RFuture<Void> removeGroupAsync(String groupName)
Description copied from interface:RStreamAsync
Removes group by name.- Specified by:
removeGroupAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of group- Returns:
- void
-
removeGroup
public void removeGroup(String groupName)
Description copied from interface:RStream
Removes group by name.- Specified by:
removeGroup
in interfaceRStream<K,V>
- Parameters:
groupName
- - name of group
-
createConsumer
public void createConsumer(String groupName, String consumerName)
Description copied from interface:RStream
Creates consumer of the group by name.Requires Redis 6.2.0 and higher.
- Specified by:
createConsumer
in interfaceRStream<K,V>
- Parameters:
groupName
- - name of groupconsumerName
- - name of consumer
-
createConsumerAsync
public RFuture<Void> createConsumerAsync(String groupName, String consumerName)
Description copied from interface:RStreamAsync
Creates consumer of the group by name.Requires Redis 6.2.0 and higher.
- Specified by:
createConsumerAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of groupconsumerName
- - name of consumer
-
removeConsumerAsync
public RFuture<Long> removeConsumerAsync(String groupName, String consumerName)
Description copied from interface:RStreamAsync
Removes consumer of the group by name.- Specified by:
removeConsumerAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of groupconsumerName
- - name of consumer- Returns:
- number of pending messages owned by consumer
-
removeConsumer
public long removeConsumer(String groupName, String consumerName)
Description copied from interface:RStream
Removes consumer of the group by name.- Specified by:
removeConsumer
in interfaceRStream<K,V>
- Parameters:
groupName
- - name of groupconsumerName
- - name of consumer- Returns:
- number of pending messages owned by consumer
-
updateGroupMessageIdAsync
public RFuture<Void> updateGroupMessageIdAsync(String groupName, StreamMessageId id)
Description copied from interface:RStreamAsync
Updates next message id delivered to consumers.- Specified by:
updateGroupMessageIdAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of groupid
- - Stream Message ID- Returns:
- void
-
updateGroupMessageId
public void updateGroupMessageId(String groupName, StreamMessageId id)
Description copied from interface:RStream
Updates next message id delivered to consumers.- Specified by:
updateGroupMessageId
in interfaceRStream<K,V>
- Parameters:
groupName
- - name of groupid
- - Stream Message ID
-
getInfo
public StreamInfo<K,V> getInfo()
Description copied from interface:RStream
Returns information about this stream.
-
getInfoAsync
public RFuture<StreamInfo<K,V>> getInfoAsync()
Description copied from interface:RStreamAsync
Returns information about this stream.- Specified by:
getInfoAsync
in interfaceRStreamAsync<K,V>
- Returns:
- info object
-
listGroups
public List<StreamGroup> listGroups()
Description copied from interface:RStream
Returns list of common info about groups belonging to this stream.- Specified by:
listGroups
in interfaceRStream<K,V>
- Returns:
- list of info objects
-
listGroupsAsync
public RFuture<List<StreamGroup>> listGroupsAsync()
Description copied from interface:RStreamAsync
Returns list of objects with information about groups belonging to this stream.- Specified by:
listGroupsAsync
in interfaceRStreamAsync<K,V>
- Returns:
- list of info objects
-
listConsumers
public List<StreamConsumer> listConsumers(String groupName)
Description copied from interface:RStream
Returns list of common info about group customers for specifiedgroupName
.- Specified by:
listConsumers
in interfaceRStream<K,V>
- Parameters:
groupName
- - name of group- Returns:
- list of info objects
-
listConsumersAsync
public RFuture<List<StreamConsumer>> listConsumersAsync(String groupName)
Description copied from interface:RStreamAsync
Returns list of objects with information about group customers for specifiedgroupName
.- Specified by:
listConsumersAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of group- Returns:
- list of info objects
-
pendingRangeAsync
public RFuture<Map<StreamMessageId,Map<K,V>>> pendingRangeAsync(String groupName, StreamMessageId startId, StreamMessageId endId, int count)
Description copied from interface:RStreamAsync
Returns stream data of pending messages by group name. Limited by start Stream Message ID and end Stream Message ID and count.StreamMessageId.MAX
is used as max Stream Message IDStreamMessageId.MIN
is used as min Stream Message ID- Specified by:
pendingRangeAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of groupstartId
- - start Stream Message IDendId
- - end Stream Message IDcount
- - amount of messages- Returns:
- map
- See Also:
RStreamAsync.listPendingAsync(java.lang.String, org.redisson.api.StreamMessageId, org.redisson.api.StreamMessageId, long, java.util.concurrent.TimeUnit, int)
-
pendingRangeAsync
public RFuture<Map<StreamMessageId,Map<K,V>>> pendingRangeAsync(String groupName, String consumerName, StreamMessageId startId, StreamMessageId endId, int count)
Description copied from interface:RStreamAsync
Returns stream data of pending messages by group and customer name. Limited by start Stream Message ID and end Stream Message ID and count.StreamMessageId.MAX
is used as max Stream Message IDStreamMessageId.MIN
is used as min Stream Message ID- Specified by:
pendingRangeAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of groupconsumerName
- - name of consumerstartId
- - start Stream Message IDendId
- - end Stream Message IDcount
- - amount of messages- Returns:
- map
- See Also:
RStreamAsync.listPendingAsync(java.lang.String, org.redisson.api.StreamMessageId, org.redisson.api.StreamMessageId, long, java.util.concurrent.TimeUnit, int)
-
pendingRangeAsync
public RFuture<Map<StreamMessageId,Map<K,V>>> pendingRangeAsync(String groupName, StreamMessageId startId, StreamMessageId endId, long idleTime, TimeUnit idleTimeUnit, int count)
Description copied from interface:RStreamAsync
Returns stream data of pending messages by group name. Limited by minimum idle time, messages count, start and end Stream Message IDs.StreamMessageId.MAX
is used as max Stream Message IDStreamMessageId.MIN
is used as min Stream Message IDRequires Redis 6.2.0 and higher.
- Specified by:
pendingRangeAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of groupstartId
- - start Stream Message IDendId
- - end Stream Message IDidleTime
- - minimum idle time of messagesidleTimeUnit
- - idle time unitcount
- - amount of messages- Returns:
- map
- See Also:
RStreamAsync.listPendingAsync(java.lang.String, org.redisson.api.StreamMessageId, org.redisson.api.StreamMessageId, long, java.util.concurrent.TimeUnit, int)
-
pendingRangeAsync
public RFuture<Map<StreamMessageId,Map<K,V>>> pendingRangeAsync(String groupName, String consumerName, StreamMessageId startId, StreamMessageId endId, long idleTime, TimeUnit idleTimeUnit, int count)
Description copied from interface:RStreamAsync
Returns stream data of pending messages by group and customer name. Limited by minimum idle time, messages count, start and end Stream Message IDs.StreamMessageId.MAX
is used as max Stream Message IDStreamMessageId.MIN
is used as min Stream Message IDRequires Redis 6.2.0 and higher.
- Specified by:
pendingRangeAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of groupconsumerName
- - name of consumerstartId
- - start Stream Message IDendId
- - end Stream Message IDidleTime
- - minimum idle time of messagesidleTimeUnit
- - idle time unitcount
- - amount of messages- Returns:
- map
- See Also:
RStreamAsync.listPendingAsync(java.lang.String, org.redisson.api.StreamMessageId, org.redisson.api.StreamMessageId, long, java.util.concurrent.TimeUnit, int)
-
pendingRange
public Map<StreamMessageId,Map<K,V>> pendingRange(String groupName, StreamMessageId startId, StreamMessageId endId, long idleTime, TimeUnit idleTimeUnit, int count)
Description copied from interface:RStream
Returns stream data of pending messages by group name. Limited by minimum idle time, messages count, start and end Stream Message IDs.StreamMessageId.MAX
is used as max Stream Message IDStreamMessageId.MIN
is used as min Stream Message IDRequires Redis 6.2.0 and higher.
- Specified by:
pendingRange
in interfaceRStream<K,V>
- Parameters:
groupName
- - name of groupstartId
- - start Stream Message IDendId
- - end Stream Message IDidleTime
- - minimum idle time of messagesidleTimeUnit
- - idle time unitcount
- - amount of messages- Returns:
- map
- See Also:
RStreamAsync.listPendingAsync(java.lang.String, org.redisson.api.StreamMessageId, org.redisson.api.StreamMessageId, long, java.util.concurrent.TimeUnit, int)
-
pendingRange
public Map<StreamMessageId,Map<K,V>> pendingRange(String groupName, String consumerName, StreamMessageId startId, StreamMessageId endId, long idleTime, TimeUnit idleTimeUnit, int count)
Description copied from interface:RStream
Returns stream data of pending messages by group and customer name. Limited by minimum idle time, messages count, start and end Stream Message IDs.StreamMessageId.MAX
is used as max Stream Message IDStreamMessageId.MIN
is used as min Stream Message IDRequires Redis 6.2.0 and higher.
- Specified by:
pendingRange
in interfaceRStream<K,V>
- Parameters:
groupName
- - name of groupconsumerName
- - name of consumerstartId
- - start Stream Message IDendId
- - end Stream Message IDidleTime
- - minimum idle time of messagesidleTimeUnit
- - idle time unitcount
- - amount of messages- Returns:
- map
- See Also:
RStreamAsync.listPendingAsync(java.lang.String, org.redisson.api.StreamMessageId, org.redisson.api.StreamMessageId, long, java.util.concurrent.TimeUnit, int)
-
pendingRange
public Map<StreamMessageId,Map<K,V>> pendingRange(String groupName, String consumerName, StreamMessageId startId, StreamMessageId endId, int count)
Description copied from interface:RStream
Returns stream data of pending messages by group and customer name. Limited by start Stream Message ID and end Stream Message ID and count.StreamMessageId.MAX
is used as max Stream Message IDStreamMessageId.MIN
is used as min Stream Message ID- Specified by:
pendingRange
in interfaceRStream<K,V>
- Parameters:
groupName
- - name of groupconsumerName
- - name of consumerstartId
- - start Stream Message IDendId
- - end Stream Message IDcount
- - amount of messages- Returns:
- map
- See Also:
RStream.listPending(java.lang.String, org.redisson.api.StreamMessageId, org.redisson.api.StreamMessageId, int)
-
pendingRange
public Map<StreamMessageId,Map<K,V>> pendingRange(String groupName, StreamMessageId startId, StreamMessageId endId, int count)
Description copied from interface:RStream
Returns stream data of pending messages by group name. Limited by start Stream Message ID and end Stream Message ID and count.StreamMessageId.MAX
is used as max Stream Message IDStreamMessageId.MIN
is used as min Stream Message ID- Specified by:
pendingRange
in interfaceRStream<K,V>
- Parameters:
groupName
- - name of groupstartId
- - start Stream Message IDendId
- - end Stream Message IDcount
- - amount of messages- Returns:
- map
- See Also:
RStream.listPending(java.lang.String, org.redisson.api.StreamMessageId, org.redisson.api.StreamMessageId, int)
-
trim
public long trim(StreamTrimArgs args)
Description copied from interface:RStream
Trims stream using strict trimming.
-
trimAsync
public RFuture<Long> trimAsync(StreamTrimArgs args)
- Specified by:
trimAsync
in interfaceRStreamAsync<K,V>
-
trimNonStrict
public long trimNonStrict(StreamTrimArgs args)
Description copied from interface:RStream
Trims stream using non-strict trimming.- Specified by:
trimNonStrict
in interfaceRStream<K,V>
- Parameters:
args
- - method arguments object- Returns:
- number of deleted messages
-
trimNonStrictAsync
public RFuture<Long> trimNonStrictAsync(StreamTrimArgs args)
- Specified by:
trimNonStrictAsync
in interfaceRStreamAsync<K,V>
-
expire
public boolean expire(long timeToLive, TimeUnit timeUnit)
Description copied from interface:RExpirable
Set a timeout for object. After the timeout has expired, the key will automatically be deleted.- Specified by:
expire
in interfaceRExpirable
- Parameters:
timeToLive
- - timeout before object will be deletedtimeUnit
- - timeout time unit- Returns:
true
if the timeout was set andfalse
if not
-
expireAsync
public RFuture<Boolean> expireAsync(long timeToLive, TimeUnit timeUnit)
Description copied from interface:RExpirableAsync
Set a timeout for object in async mode. After the timeout has expired, the key will automatically be deleted.- Specified by:
expireAsync
in interfaceRExpirableAsync
- Parameters:
timeToLive
- - timeout before object will be deletedtimeUnit
- - timeout time unit- Returns:
true
if the timeout was set andfalse
if not
-
expireAt
public boolean expireAt(long timestamp)
Description copied from interface:RExpirable
UseRExpirable.expire(Instant)
instead- Specified by:
expireAt
in interfaceRExpirable
- Parameters:
timestamp
- - expire date in milliseconds (Unix timestamp)- Returns:
true
if the timeout was set andfalse
if not
-
expireAtAsync
public RFuture<Boolean> expireAtAsync(long timestamp)
Description copied from interface:RExpirableAsync
UseRExpirableAsync.expireAsync(Instant)
instead- Specified by:
expireAtAsync
in interfaceRExpirableAsync
- Parameters:
timestamp
- - expire date in milliseconds (Unix timestamp)- Returns:
true
if the timeout was set andfalse
if not
-
expire
public boolean expire(Instant instant)
Description copied from interface:RExpirable
Set an expire date for object. When expire date comes the key will automatically be deleted.- Specified by:
expire
in interfaceRExpirable
- Parameters:
instant
- - expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireAsync
public RFuture<Boolean> expireAsync(Instant instant)
Description copied from interface:RExpirableAsync
Set an expire date for object. When expire date comes the key will automatically be deleted.- Specified by:
expireAsync
in interfaceRExpirableAsync
- Parameters:
instant
- - expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireAt
public boolean expireAt(Date timestamp)
Description copied from interface:RExpirable
UseRExpirable.expire(Instant)
instead- Specified by:
expireAt
in interfaceRExpirable
- Parameters:
timestamp
- - expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireAtAsync
public RFuture<Boolean> expireAtAsync(Date timestamp)
Description copied from interface:RExpirableAsync
UseRExpirableAsync.expireAsync(Instant)
instead- Specified by:
expireAtAsync
in interfaceRExpirableAsync
- Parameters:
timestamp
- - expire date- Returns:
true
if the timeout was set andfalse
if not
-
clearExpire
public boolean clearExpire()
Description copied from interface:RExpirable
Clear an expire timeout or expire date for object.- Specified by:
clearExpire
in interfaceRExpirable
- Returns:
true
if timeout was removedfalse
if object does not exist or does not have an associated timeout
-
clearExpireAsync
public RFuture<Boolean> clearExpireAsync()
Description copied from interface:RExpirableAsync
Clear an expire timeout or expire date for object in async mode. Object will not be deleted.- Specified by:
clearExpireAsync
in interfaceRExpirableAsync
- Returns:
true
if the timeout was cleared andfalse
if not
-
remainTimeToLive
public long remainTimeToLive()
Description copied from interface:RExpirable
Remaining time to live of Redisson object that has a timeout- Specified by:
remainTimeToLive
in interfaceRExpirable
- Returns:
- time in milliseconds -2 if the key does not exist. -1 if the key exists but has no associated expire.
-
remainTimeToLiveAsync
public RFuture<Long> remainTimeToLiveAsync()
Description copied from interface:RExpirableAsync
Remaining time to live of Redisson object that has a timeout- Specified by:
remainTimeToLiveAsync
in interfaceRExpirableAsync
- Returns:
- time in milliseconds -2 if the key does not exist. -1 if the key exists but has no associated expire.
-
expireAsync
protected RFuture<Boolean> expireAsync(long timeToLive, TimeUnit timeUnit, String... keys)
-
-