Package org.redisson.api
Interface RStreamAsync<K,V>
-
- Type Parameters:
K
- key typeV
- value type
- All Superinterfaces:
RExpirableAsync
,RObjectAsync
- All Known Subinterfaces:
RStream<K,V>
- All Known Implementing Classes:
RedissonStream
public interface RStreamAsync<K,V> extends RExpirableAsync
Async interface for Redis Stream object.Requires Redis 5.0.0 and higher.
- Author:
- Nikita Koksharov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RFuture<Long>
ackAsync(String groupName, StreamMessageId... ids)
Marks pending messages by group name and streamids
as correctly processed.RFuture<StreamMessageId>
addAllAsync(Map<K,V> entries)
Appends new entries and returns generated Stream IDRFuture<StreamMessageId>
addAllAsync(Map<K,V> entries, int trimLen, boolean trimStrict)
Appends new entries and returns generated Stream ID.RFuture<Void>
addAllAsync(StreamMessageId id, Map<K,V> entries)
Appends new entries by specified Stream IDRFuture<Void>
addAllAsync(StreamMessageId id, Map<K,V> entries, int trimLen, boolean trimStrict)
Appends new entries by specified Stream ID.RFuture<StreamMessageId>
addAsync(K key, V value)
Appends a new entry and returns generated Stream IDRFuture<StreamMessageId>
addAsync(K key, V value, int trimLen, boolean trimStrict)
Appends a new entry and returns generated Stream ID.RFuture<Void>
addAsync(StreamMessageId id, K key, V value)
Appends a new entry by specified Stream IDRFuture<Void>
addAsync(StreamMessageId id, K key, V value, int trimLen, boolean trimStrict)
Appends a new entry by specified Stream ID.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.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.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.RFuture<PendingResult>
listPendingAsync(String groupName)
Returns pending messages by group nameRFuture<List<PendingEntry>>
listPendingAsync(String groupName, String consumerName, StreamMessageId startId, StreamMessageId endId, int count)
Returns list of pending messages by group name and consumer name.RFuture<List<PendingEntry>>
listPendingAsync(String groupName, StreamMessageId startId, StreamMessageId endId, int count)
Returns list of pending messages by group name.RFuture<Map<StreamMessageId,Map<K,V>>>
rangeAsync(int count, StreamMessageId startId, StreamMessageId endId)
Read 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)
Read stream data in range by specified start Stream ID (included) and end Stream ID (included).RFuture<Map<StreamMessageId,Map<K,V>>>
rangeReversedAsync(int count, StreamMessageId startId, StreamMessageId endId)
Read 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)
Read stream data in reverse order in range by specified start Stream ID (included) and end Stream ID (included).RFuture<Map<StreamMessageId,Map<K,V>>>
readAsync(int count, long timeout, TimeUnit unit, StreamMessageId... ids)
Read stream data by specified collection of Stream IDs.RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>>
readAsync(int count, long timeout, TimeUnit unit, StreamMessageId id, String name2, StreamMessageId id2)
Read stream data by specified stream name including this stream.RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>>
readAsync(int count, long timeout, TimeUnit unit, StreamMessageId id, String name2, StreamMessageId id2, String name3, StreamMessageId id3)
Read stream data by specified stream names including this stream.RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>>
readAsync(int count, long timeout, TimeUnit unit, StreamMessageId id, Map<String,StreamMessageId> nameToId)
Read stream data by specified stream id mapped by name including this stream.RFuture<Map<StreamMessageId,Map<K,V>>>
readAsync(int count, StreamMessageId... ids)
Read stream data by specified collection of Stream IDs.RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>>
readAsync(int count, StreamMessageId id, String name2, StreamMessageId id2)
Read stream data by specified stream name including this stream.RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>>
readAsync(int count, StreamMessageId id, String name2, StreamMessageId id2, String name3, StreamMessageId id3)
Read stream data by specified stream names including this stream.RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>>
readAsync(int count, StreamMessageId id, Map<String,StreamMessageId> nameToId)
Read stream data by specified stream id mapped by name including this stream.RFuture<Map<StreamMessageId,Map<K,V>>>
readAsync(long timeout, TimeUnit unit, StreamMessageId... ids)
Read stream data by specified collection of Stream IDs.RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>>
readAsync(long timeout, TimeUnit unit, StreamMessageId id, String name2, StreamMessageId id2)
Read stream data by specified stream name including this stream.RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>>
readAsync(long timeout, TimeUnit unit, StreamMessageId id, String name2, StreamMessageId id2, String name3, StreamMessageId id3)
Read stream data by specified stream names including this stream.RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>>
readAsync(long timeout, TimeUnit unit, StreamMessageId id, Map<String,StreamMessageId> nameToId)
Read stream data by specified stream id mapped by name including this stream.RFuture<Map<StreamMessageId,Map<K,V>>>
readAsync(StreamMessageId... ids)
Read stream data by specified collection of Stream IDs.RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>>
readAsync(StreamMessageId id, String name2, StreamMessageId id2)
Read stream data by specified stream name including this stream.RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>>
readAsync(StreamMessageId id, String name2, StreamMessageId id2, String name3, StreamMessageId id3)
Read stream data by specified stream names including this stream.RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>>
readAsync(StreamMessageId id, Map<String,StreamMessageId> nameToId)
Read stream data by specified stream id mapped by name including this stream.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<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> nameToId)
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> nameToId)
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, 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> nameToId)
Read stream data fromgroupName
byconsumerName
, starting by specified message ids for this and other streams.RFuture<Long>
removeAsync(StreamMessageId... ids)
Removes messages by id.RFuture<Long>
removeConsumerAsync(String groupName, String consumerName)
Removes consumer of the group by name.RFuture<Void>
removeGroupAsync(String groupName)
Removes group by name.RFuture<Long>
sizeAsync()
Returns number of entries in streamRFuture<Long>
trimAsync(int size)
Trims stream to specified sizeRFuture<Long>
trimNonStrictAsync(int size)
Trims stream to few tens of entries more than specified length to trim.RFuture<Void>
updateGroupMessageIdAsync(String groupName, StreamMessageId id)
Updates next message id delivered to consumers.-
Methods inherited from interface org.redisson.api.RExpirableAsync
clearExpireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsync
-
Methods inherited from interface org.redisson.api.RObjectAsync
copyAsync, deleteAsync, dumpAsync, isExistsAsync, migrateAsync, moveAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsync
-
-
-
-
Method Detail
-
createGroupAsync
RFuture<Void> createGroupAsync(String groupName)
Creates consumer group by name.- Parameters:
groupName
- - name of group- Returns:
- void
-
createGroupAsync
RFuture<Void> createGroupAsync(String groupName, StreamMessageId id)
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- Parameters:
groupName
- - name of groupid
- - stream id- Returns:
- void
-
removeGroupAsync
RFuture<Void> removeGroupAsync(String groupName)
Removes group by name.- Parameters:
groupName
- - name of group- Returns:
- void
-
removeConsumerAsync
RFuture<Long> removeConsumerAsync(String groupName, String consumerName)
Removes consumer of the group by name.- Parameters:
groupName
- - name of groupconsumerName
- - name of consumer- Returns:
- number of pending messages owned by consumer
-
updateGroupMessageIdAsync
RFuture<Void> updateGroupMessageIdAsync(String groupName, StreamMessageId id)
Updates next message id delivered to consumers.- Parameters:
groupName
- - name of groupid
- - Stream Message ID- Returns:
- void
-
ackAsync
RFuture<Long> ackAsync(String groupName, StreamMessageId... ids)
Marks pending messages by group name and streamids
as correctly processed.- Parameters:
groupName
- - name of groupids
- - stream ids- Returns:
- marked messages amount
-
listPendingAsync
RFuture<PendingResult> listPendingAsync(String groupName)
Returns pending messages by group name- Parameters:
groupName
- - name of group- Returns:
- result object
-
listPendingAsync
RFuture<List<PendingEntry>> listPendingAsync(String groupName, StreamMessageId startId, StreamMessageId endId, int count)
Returns list of pending messages by group name. Limited by start stream id and end stream id and count.StreamMessageId.MAX
is used as max stream idStreamMessageId.MIN
is used as min stream id- Parameters:
groupName
- - name of groupstartId
- - start stream idendId
- - end stream idcount
- - amount of messages- Returns:
- list
-
listPendingAsync
RFuture<List<PendingEntry>> listPendingAsync(String groupName, String consumerName, StreamMessageId startId, StreamMessageId endId, int count)
Returns list of pending messages by group name and consumer name. Limited by start stream id and end stream id and count.StreamMessageId.MAX
is used as max stream idStreamMessageId.MIN
is used as min stream id- Parameters:
consumerName
- - name of consumergroupName
- - name of groupstartId
- - start stream idendId
- - end stream idcount
- - amount of messages- Returns:
- list
-
claimAsync
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.- Parameters:
groupName
- - name of groupconsumerName
- - name of consumeridleTime
- - minimum idle time of messagesidleTimeUnit
- - idle time unitids
- - stream ids- Returns:
- stream data mapped by Stream ID
-
fastClaimAsync
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.- 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
-
readGroupAsync
RFuture<Map<StreamMessageId,Map<K,V>>> readGroupAsync(String groupName, String consumerName, StreamMessageId... ids)
Read stream data fromgroupName
byconsumerName
and specified collection of Stream IDs.- Parameters:
groupName
- - name of groupconsumerName
- - name of consumerids
- - collection of Stream IDs- Returns:
- stream data mapped by Stream ID
-
readGroupAsync
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.- Parameters:
groupName
- - name of groupconsumerName
- - name of consumercount
- - stream data size limitids
- - collection of Stream IDs- Returns:
- stream data mapped by Stream ID
-
readGroupAsync
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. Wait for stream data availability for specifiedtimeout
interval.- 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
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. Wait for stream data availability for specifiedtimeout
interval.- 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
-
readGroupAsync
RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>> readGroupAsync(String groupName, String consumerName, StreamMessageId id, Map<String,StreamMessageId> nameToId)
Read stream data fromgroupName
byconsumerName
, starting by specified message ids for this and other streams.- Parameters:
groupName
- - name of groupconsumerName
- - name of consumerid
- - starting message id for this streamnameToId
- - Stream Message ID mapped by stream name- Returns:
- stream data mapped by key and Stream Message ID
-
readGroupAsync
RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>> readGroupAsync(String groupName, String consumerName, int count, StreamMessageId id, Map<String,StreamMessageId> nameToId)
Read stream data fromgroupName
byconsumerName
, starting by specified message ids for this and other streams.- Parameters:
groupName
- - name of groupconsumerName
- - name of consumercount
- - stream data size limitid
- - starting message id for this streamnameToId
- - Stream Message ID mapped by stream name- Returns:
- stream data mapped by key and Stream Message ID
-
readGroupAsync
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. Waits for the first stream data availability for specifiedtimeout
interval.- 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
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. Waits for the first stream data availability for specifiedtimeout
interval.- 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
RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>> readGroupAsync(String groupName, String consumerName, long timeout, TimeUnit unit, StreamMessageId id, Map<String,StreamMessageId> nameToId)
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.- Parameters:
groupName
- - name of groupconsumerName
- - name of consumertimeout
- - time interval to wait for stream data availabilityunit
- - time interval unitid
- - starting message id for this streamnameToId
- - Stream Message ID mapped by stream name- Returns:
- stream data mapped by key and Stream Message ID
-
readGroupAsync
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.- 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
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.- 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
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.- 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
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.- 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
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. Waits for the first stream data availability for specifiedtimeout
interval.- 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
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. Waits for the first stream data availability for specifiedtimeout
interval.- 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
-
addAsync
RFuture<StreamMessageId> addAsync(K key, V value)
Appends a new entry and returns generated Stream ID- Parameters:
key
- - key of entryvalue
- - value of entry- Returns:
- Stream ID
-
addAsync
RFuture<Void> addAsync(StreamMessageId id, K key, V value)
Appends a new entry by specified Stream ID- Parameters:
id
- - Stream IDkey
- - key of entryvalue
- - value of entry- Returns:
- void
-
addAsync
RFuture<StreamMessageId> addAsync(K key, V value, int trimLen, boolean trimStrict)
Appends a new entry and returns generated Stream ID. Trims stream to a specifiedtrimLen
size. IftrimStrict
isfalse
then trims to few tens of entries more than specified length to trim.- Parameters:
key
- - key of entryvalue
- - value of entrytrimLen
- - length to trimtrimStrict
- - iffalse
then trims to few tens of entries more than specified length to trim- Returns:
- Stream ID
-
addAsync
RFuture<Void> addAsync(StreamMessageId id, K key, V value, int trimLen, boolean trimStrict)
Appends a new entry by specified Stream ID. Trims stream to a specifiedtrimLen
size. IftrimStrict
isfalse
then trims to few tens of entries more than specified length to trim.- Parameters:
id
- - Stream IDkey
- - key of entryvalue
- - value of entrytrimLen
- - length to trimtrimStrict
- - iffalse
then trims to few tens of entries more than specified length to trim- Returns:
- void
-
addAllAsync
RFuture<StreamMessageId> addAllAsync(Map<K,V> entries)
Appends new entries and returns generated Stream ID- Parameters:
entries
- - entries to add- Returns:
- Stream ID
-
addAllAsync
RFuture<Void> addAllAsync(StreamMessageId id, Map<K,V> entries)
Appends new entries by specified Stream ID- Parameters:
id
- - Stream IDentries
- - entries to add- Returns:
- void
-
addAllAsync
RFuture<StreamMessageId> addAllAsync(Map<K,V> entries, int trimLen, boolean trimStrict)
Appends new entries and returns generated Stream ID. Trims stream to a specifiedtrimLen
size. IftrimStrict
isfalse
then trims to few tens of entries more than specified length to trim.- Parameters:
entries
- - entries to addtrimLen
- - length to trimtrimStrict
- - iffalse
then trims to few tens of entries more than specified length to trim- Returns:
- Stream ID
-
addAllAsync
RFuture<Void> addAllAsync(StreamMessageId id, Map<K,V> entries, int trimLen, boolean trimStrict)
Appends new entries by specified Stream ID. Trims stream to a specifiedtrimLen
size. IftrimStrict
isfalse
then trims to few tens of entries more than specified length to trim.- Parameters:
id
- - Stream IDentries
- - entries to addtrimLen
- - length to trimtrimStrict
- - iffalse
then trims to few tens of entries more than specified length to trim- Returns:
- void
-
readAsync
RFuture<Map<StreamMessageId,Map<K,V>>> readAsync(StreamMessageId... ids)
Read stream data by specified collection of Stream IDs.- Parameters:
ids
- - collection of Stream IDs- Returns:
- stream data mapped by Stream ID
-
readAsync
RFuture<Map<StreamMessageId,Map<K,V>>> readAsync(int count, StreamMessageId... ids)
Read stream data by specified collection of Stream IDs.- Parameters:
count
- - stream data size limitids
- - collection of Stream IDs- Returns:
- stream data mapped by Stream ID
-
readAsync
RFuture<Map<StreamMessageId,Map<K,V>>> readAsync(long timeout, TimeUnit unit, StreamMessageId... ids)
Read stream data by specified collection of Stream IDs. Wait for stream data availability for specifiedtimeout
interval.- Parameters:
timeout
- - time interval to wait for stream data availabilityunit
- - time interval unitids
- - collection of Stream IDs- Returns:
- stream data mapped by Stream ID
-
readAsync
RFuture<Map<StreamMessageId,Map<K,V>>> readAsync(int count, long timeout, TimeUnit unit, StreamMessageId... ids)
Read stream data by specified collection of Stream IDs. Wait for stream data availability for specifiedtimeout
interval.- Parameters:
count
- - 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
-
readAsync
RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>> readAsync(StreamMessageId id, String name2, StreamMessageId id2)
Read stream data by specified stream name including this stream.- Parameters:
id
- - id of this streamname2
- - name of second streamid2
- - id of second stream- Returns:
- stream data mapped by key and Stream ID
-
readAsync
RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>> readAsync(StreamMessageId id, String name2, StreamMessageId id2, String name3, StreamMessageId id3)
Read stream data by specified stream names including this stream.- Parameters:
id
- - id of this streamname2
- - name of second streamid2
- - id of second streamname3
- - name of third streamid3
- - id of third stream- Returns:
- stream data mapped by key and Stream ID
-
readAsync
RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>> readAsync(StreamMessageId id, Map<String,StreamMessageId> nameToId)
Read stream data by specified stream id mapped by name including this stream.- Parameters:
id
- - id of this streamnameToId
- - stream id mapped by name- Returns:
- stream data mapped by key and Stream ID
-
readAsync
RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>> readAsync(int count, StreamMessageId id, String name2, StreamMessageId id2)
Read stream data by specified stream name including this stream.- Parameters:
count
- - stream data size limitid
- - id of this streamname2
- - name of second streamid2
- - id of second stream- Returns:
- stream data mapped by key and Stream ID
-
readAsync
RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>> readAsync(int count, StreamMessageId id, String name2, StreamMessageId id2, String name3, StreamMessageId id3)
Read stream data by specified stream names including this stream.- Parameters:
count
- - stream data size limitid
- - id of this streamname2
- - name of second streamid2
- - id of second streamname3
- - name of third streamid3
- - id of third stream- Returns:
- stream data mapped by key and Stream ID
-
readAsync
RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>> readAsync(int count, StreamMessageId id, Map<String,StreamMessageId> nameToId)
Read stream data by specified stream id mapped by name including this stream.- Parameters:
count
- - stream data size limitid
- - id of this streamnameToId
- - stream id mapped by name- Returns:
- stream data mapped by key and Stream ID
-
readAsync
RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>> readAsync(long timeout, TimeUnit unit, StreamMessageId id, String name2, StreamMessageId id2)
Read stream data by specified stream name including this stream. Wait for the first stream data availability for specifiedtimeout
interval.- Parameters:
timeout
- - time interval to wait for stream data availabilityunit
- - time interval unitid
- - id of this streamname2
- - name of second streamid2
- - id of second stream- Returns:
- stream data mapped by key and Stream ID
-
readAsync
RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>> readAsync(long timeout, TimeUnit unit, StreamMessageId id, String name2, StreamMessageId id2, String name3, StreamMessageId id3)
Read stream data by specified stream names including this stream. Wait for the first stream data availability for specifiedtimeout
interval.- Parameters:
timeout
- - time interval to wait for stream data availabilityunit
- - time interval unitid
- - id of this streamname2
- - name of second streamid2
- - id of second streamname3
- - name of third streamid3
- - id of third stream- Returns:
- stream data mapped by key and Stream ID
-
readAsync
RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>> readAsync(long timeout, TimeUnit unit, StreamMessageId id, Map<String,StreamMessageId> nameToId)
Read stream data by specified stream id mapped by name including this stream. Wait for the first stream data availability for specifiedtimeout
interval.- Parameters:
timeout
- - time interval to wait for stream data availabilityunit
- - time interval unitid
- - id of this streamnameToId
- - stream id mapped by name- Returns:
- stream data mapped by key and Stream ID
-
readAsync
RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>> readAsync(int count, long timeout, TimeUnit unit, StreamMessageId id, String name2, StreamMessageId id2)
Read stream data by specified stream name including this stream. Wait for the first stream data availability for specifiedtimeout
interval.- Parameters:
count
- - stream data size limittimeout
- - time interval to wait for stream data availabilityunit
- - time interval unitid
- - id of this streamname2
- - name of second streamid2
- - id of second stream- Returns:
- stream data mapped by key and Stream ID
-
readAsync
RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>> readAsync(int count, long timeout, TimeUnit unit, StreamMessageId id, String name2, StreamMessageId id2, String name3, StreamMessageId id3)
Read stream data by specified stream names including this stream. Wait for the first stream data availability for specifiedtimeout
interval.- Parameters:
count
- - stream data size limittimeout
- - time interval to wait for stream data availabilityunit
- - time interval unitid
- - id of this streamname2
- - name of second streamid2
- - id of second streamname3
- - name of third streamid3
- - id of third stream- Returns:
- stream data mapped by key and Stream ID
-
readAsync
RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>> readAsync(int count, long timeout, TimeUnit unit, StreamMessageId id, Map<String,StreamMessageId> nameToId)
Read stream data by specified stream id mapped by name including this stream. Wait for the first stream data availability for specifiedtimeout
interval.- Parameters:
count
- - stream data size limittimeout
- - time interval to wait for stream data availabilityunit
- - time interval unitid
- - id of this streamnameToId
- - stream id mapped by name- Returns:
- stream data mapped by key and Stream ID
-
rangeAsync
RFuture<Map<StreamMessageId,Map<K,V>>> rangeAsync(StreamMessageId startId, StreamMessageId endId)
Read stream data in range by specified start Stream ID (included) and end Stream ID (included).- Parameters:
startId
- - start Stream IDendId
- - end Stream ID- Returns:
- stream data mapped by Stream ID
-
rangeAsync
RFuture<Map<StreamMessageId,Map<K,V>>> rangeAsync(int count, StreamMessageId startId, StreamMessageId endId)
Read stream data in range by specified start Stream ID (included) and end Stream ID (included).- Parameters:
count
- - stream data size limitstartId
- - start Stream IDendId
- - end Stream ID- Returns:
- stream data mapped by Stream ID
-
rangeReversedAsync
RFuture<Map<StreamMessageId,Map<K,V>>> rangeReversedAsync(StreamMessageId startId, StreamMessageId endId)
Read stream data in reverse order in range by specified start Stream ID (included) and end Stream ID (included).- Parameters:
startId
- - start Stream IDendId
- - end Stream ID- Returns:
- stream data mapped by Stream ID
-
rangeReversedAsync
RFuture<Map<StreamMessageId,Map<K,V>>> rangeReversedAsync(int count, StreamMessageId startId, StreamMessageId endId)
Read stream data in reverse order in range by specified start Stream ID (included) and end Stream ID (included).- Parameters:
count
- - stream data size limitstartId
- - start Stream IDendId
- - end Stream ID- Returns:
- stream data mapped by Stream ID
-
removeAsync
RFuture<Long> removeAsync(StreamMessageId... ids)
Removes messages by id.- Parameters:
ids
- - id of messages to remove- Returns:
- deleted messages amount
-
trimAsync
RFuture<Long> trimAsync(int size)
Trims stream to specified size- Parameters:
size
- - new size of stream- Returns:
- number of deleted messages
-
-