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 longack(String groupName, StreamMessageId... id)Marks pending messages by group name and streamidsas correctly processed.RFuture<Long>ackAsync(String groupName, StreamMessageId... ids)Marks pending messages by group name and streamidsas correctly processed.StreamMessageIdadd(K key, V value)StreamMessageIdadd(K key, V value, int trimLen, boolean trimStrict)StreamMessageIdadd(StreamAddArgs<K,V> args)Appends a new entry/entries and returns generated Stream Message IDvoidadd(StreamMessageId id, K key, V value)voidadd(StreamMessageId id, K key, V value, int trimLen, boolean trimStrict)voidadd(StreamMessageId id, StreamAddArgs<K,V> args)Appends a new entry/entries by specified Stream Message IDStreamMessageIdaddAll(Map<K,V> entries)StreamMessageIdaddAll(Map<K,V> entries, int trimLen, boolean trimStrict)voidaddAll(StreamMessageId id, Map<K,V> entries)voidaddAll(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 voidcheckKey(Object key)protected voidcheckValue(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.booleanclearExpire()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)voidcreateConsumer(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.voidcreateGroup(String groupName)Creates consumer group by name.voidcreateGroup(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.booleanexpire(long timeToLive, TimeUnit timeUnit)Set a timeout for object.booleanexpire(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.booleanexpireAt(long timestamp)UseRExpirable.expire(Instant)insteadbooleanexpireAt(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)insteadFastAutoClaimResultfastAutoClaim(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.PendingResultgetPendingInfo(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 fromgroupNamebyconsumerNameand 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 fromgroupNamebyconsumerName, 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 fromgroupNamebyconsumerName, 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 fromgroupNamebyconsumerNameand 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 fromgroupNamebyconsumerName, 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 fromgroupNamebyconsumerName, 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 fromgroupNamebyconsumerName, 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 fromgroupNamebyconsumerNameand 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 fromgroupNamebyconsumerName, 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 fromgroupNamebyconsumerName, 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 fromgroupNamebyconsumerName, 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 fromgroupNamebyconsumerNameand 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 fromgroupNamebyconsumerName, 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 fromgroupNamebyconsumerName, 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 fromgroupNamebyconsumerName, starting by specified message ids for this and other streams.longremainTimeToLive()Remaining time to live of Redisson object that has a timeoutRFuture<Long>remainTimeToLiveAsync()Remaining time to live of Redisson object that has a timeoutlongremove(StreamMessageId... ids)Removes messages by id.RFuture<Long>removeAsync(StreamMessageId... ids)Removes messages by id.longremoveConsumer(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.voidremoveGroup(String groupName)Removes group by name.RFuture<Void>removeGroupAsync(String groupName)Removes group by name.longsize()Returns number of entries in streamRFuture<Long>sizeAsync()Returns number of entries in streamlongtrim(int count)Trims stream using MAXLEN strategy to specified sizelongtrim(TrimStrategy strategy, int threshold)Trims stream to specified sizeRFuture<Long>trimAsync(int count)Trims stream using MAXLEN strategy to specified sizeRFuture<Long>trimAsync(TrimStrategy strategy, int threshold)Trims stream to specified sizelongtrimNonStrict(int count)Trims stream using MAXLEN strategy to almost exact trimming threshold..longtrimNonStrict(TrimStrategy strategy, int threshold)Trims stream using almost exact trimming threshold.longtrimNonStrict(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(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.voidupdateGroupMessageId(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:RStreamCreates consumer group by name. Only new messages will be available for consumers of this group.- Specified by:
createGroupin interfaceRStream<K,V>- Parameters:
groupName- - name of group
-
createGroupAsync
public RFuture<Void> createGroupAsync(String groupName)
Description copied from interface:RStreamAsyncCreates consumer group by name.- Specified by:
createGroupAsyncin interfaceRStreamAsync<K,V>- Parameters:
groupName- - name of group- Returns:
- void
-
createGroup
public void createGroup(String groupName, StreamMessageId id)
Description copied from interface:RStreamCreates consumer group by name and Stream Message ID. Only new messages after defined streamidwill be available for consumers of this group.StreamMessageId.NEWESTis used for messages arrived since the moment of group creationStreamMessageId.ALLis used for all messages added before and after the moment of group creation- Specified by:
createGroupin interfaceRStream<K,V>- Parameters:
groupName- - name of groupid- - Stream Message ID
-
createGroupAsync
public RFuture<Void> createGroupAsync(String groupName, StreamMessageId id)
Description copied from interface:RStreamAsyncCreates consumer group by name and stream id. Only new messages after defined streamidwill be available for consumers of this group.StreamMessageId.NEWESTis used for messages arrived since the moment of group creating- Specified by:
createGroupAsyncin 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:RStreamAsyncMarks pending messages by group name and streamidsas correctly processed.- Specified by:
ackAsyncin 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:RStreamMarks pending messages by group name and streamidsas correctly processed.
-
getPendingInfoAsync
public RFuture<PendingResult> getPendingInfoAsync(String groupName)
Description copied from interface:RStreamAsyncReturns common info about pending messages by group name.- Specified by:
getPendingInfoAsyncin interfaceRStreamAsync<K,V>- Parameters:
groupName- - name of group- Returns:
- result object
-
getPendingInfo
public PendingResult getPendingInfo(String groupName)
Description copied from interface:RStreamReturns common info about pending messages by group name.- Specified by:
getPendingInfoin 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:RStreamAsyncReturns 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.MAXis used as max Stream Message IDStreamMessageId.MINis used as min Stream Message ID- Specified by:
listPendingAsyncin 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:RStreamAsyncReturns list of common info about pending messages by group name. Limited by start Stream Message ID and end Stream Message ID and count.StreamMessageId.MAXis used as max Stream Message IDStreamMessageId.MINis used as min Stream Message ID- Specified by:
listPendingAsyncin 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:RStreamAsyncReturns list of common info about pending messages by group name. Limited by minimum idle time, messages count, start and end Stream Message IDs.StreamMessageId.MAXis used as max Stream Message IDStreamMessageId.MINis used as min Stream Message IDRequires Redis 6.2.0 and higher.
- Specified by:
listPendingAsyncin 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:RStreamAsyncReturns 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.MAXis used as max Stream Message IDStreamMessageId.MINis used as min Stream Message IDRequires Redis 6.2.0 and higher.
- Specified by:
listPendingAsyncin 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:RStreamReturns list of common info about pending messages by group name. Limited by start Stream Message ID and end Stream Message ID and count.StreamMessageId.MAXis used as max Stream Message IDStreamMessageId.MINis used as min Stream Message ID- Specified by:
listPendingin 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:RStreamReturns 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.MAXis used as max Stream Message IDStreamMessageId.MINis used as min Stream Message ID- Specified by:
listPendingin 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:RStreamReturns stream data of pending messages by group name. Limited by minimum idle time, messages count, start and end Stream Message IDs.StreamMessageId.MAXis used as max Stream Message IDStreamMessageId.MINis used as min Stream Message IDRequires Redis 6.2.0 and higher.
- Specified by:
listPendingin 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:RStreamReturns stream data of pending messages by group and customer name. Limited by minimum idle time, messages count, start and end Stream Message IDs.StreamMessageId.MAXis used as max Stream Message IDStreamMessageId.MINis used as min Stream Message IDRequires Redis 6.2.0 and higher.
- Specified by:
listPendingin 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:RStreamTransfers 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:RStreamAsyncTransfers ownership of pending messages by id to a new consumer by name if idle time of messages is greater than defined value.- Specified by:
fastClaimAsyncin 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:RStreamTransfers 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:RStreamAsyncTransfers 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:
autoClaimAsyncin 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:RStreamTransfers 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:
fastAutoClaimin 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:RStreamRead 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:RStreamRead 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:RStreamAsyncRead stream data from consumer group and multiple streams including current.- Specified by:
readGroupAsyncin 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:RStreamAsyncRead stream data from consumer group and current stream only.- Specified by:
readGroupAsyncin 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:RStreamAsyncTransfers 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:
fastAutoClaimAsyncin 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:RStreamAsyncTransfers ownership of pending messages by id to a new consumer by name if idle time of messages is greater than defined value.- Specified by:
claimAsyncin 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:RStreamTransfers 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:RStreamAsyncRead stream data fromgroupNamebyconsumerNameand specified collection of Stream IDs.- Specified by:
readGroupAsyncin 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:RStreamAsyncRead stream data fromgroupNamebyconsumerNameand specified collection of Stream IDs.- Specified by:
readGroupAsyncin 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:RStreamAsyncRead stream data fromgroupNamebyconsumerNameand specified collection of Stream IDs. Wait for stream data availability for specifiedtimeoutinterval.- Specified by:
readGroupAsyncin 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:RStreamAsyncRead stream data fromgroupNamebyconsumerNameand specified collection of Stream IDs. Wait for stream data availability for specifiedtimeoutinterval.- Specified by:
readGroupAsyncin 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:RStreamAsyncRead stream data fromgroupNamebyconsumerName, starting by specified message ids for this and other streams.- Specified by:
readGroupAsyncin 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:RStreamAsyncRead stream data fromgroupNamebyconsumerName, starting by specified message ids for this and other streams.- Specified by:
readGroupAsyncin 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:RStreamAsyncRead stream data fromgroupNamebyconsumerName, starting by specified message ids for this and other streams. Waits for the first stream data availability for specifiedtimeoutinterval.- Specified by:
readGroupAsyncin 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:RStreamAsyncRead stream data fromgroupNamebyconsumerName, starting by specified message ids for this and other streams. Waits for the first stream data availability for specifiedtimeoutinterval.- Specified by:
readGroupAsyncin 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:RStreamAsyncRead stream data fromgroupNamebyconsumerName, starting by specified message ids for this and other streams. Waits for the first stream data availability for specifiedtimeoutinterval.- Specified by:
readGroupAsyncin 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:RStreamAsyncRead stream data fromgroupNamebyconsumerName, starting by specified message ids for this and other streams.- Specified by:
readGroupAsyncin 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:RStreamAsyncRead stream data fromgroupNamebyconsumerName, starting by specified message ids for this and other streams.- Specified by:
readGroupAsyncin 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:RStreamAsyncRead stream data fromgroupNamebyconsumerName, starting by specified message ids for this and other streams.- Specified by:
readGroupAsyncin 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:RStreamAsyncRead stream data fromgroupNamebyconsumerName, starting by specified message ids for this and other streams.- Specified by:
readGroupAsyncin 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:RStreamAsyncRead stream data fromgroupNamebyconsumerName, starting by specified message ids for this and other streams. Waits for the first stream data availability for specifiedtimeoutinterval.- Specified by:
readGroupAsyncin 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:RStreamAsyncRead stream data fromgroupNamebyconsumerName, starting by specified message ids for this and other streams. Waits for the first stream data availability for specifiedtimeoutinterval.- Specified by:
readGroupAsyncin 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:
addAllAsyncin 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:
addAllAsyncin 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:
addAllAsyncin 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:
addAllAsyncin interfaceRStreamAsync<K,V>
-
size
public long size()
Description copied from interface:RStreamReturns number of entries in stream
-
sizeAsync
public RFuture<Long> sizeAsync()
Description copied from interface:RStreamAsyncReturns number of entries in stream- Specified by:
sizeAsyncin interfaceRStreamAsync<K,V>- Returns:
- size of stream
-
read
public Map<String,Map<StreamMessageId,Map<K,V>>> read(StreamMultiReadArgs args)
Description copied from interface:RStreamRead 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:RStreamAsyncRead stream data from multiple streams including current.- Specified by:
readAsyncin 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:RStreamRead 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:RStreamAsyncRead stream data from current stream only.- Specified by:
readAsyncin 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:
readAsyncin 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:
readAsyncin 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:
readAsyncin 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:
readAsyncin 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:
readAsyncin 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:
readAsyncin 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:
readAsyncin interfaceRStreamAsync<K,V>
-
readAsync
public RFuture<Map<String,Map<StreamMessageId,Map<K,V>>>> readAsync(int count, StreamMessageId id, String key2, StreamMessageId id2)
- Specified by:
readAsyncin 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:
readAsyncin 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:
readAsyncin 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:
readAsyncin 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:
readAsyncin interfaceRStreamAsync<K,V>
-
add
public StreamMessageId add(StreamAddArgs<K,V> args)
Description copied from interface:RStreamAppends 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:RStreamAppends 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:RStreamAsyncAppends a new entry/entries and returns generated Stream Message ID- Specified by:
addAsyncin 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:RStreamAsyncAppends a new entry/entries by specified Stream Message ID- Specified by:
addAsyncin 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:
addAsyncin interfaceRStreamAsync<K,V>
-
addAsync
public RFuture<Void> addAsync(StreamMessageId id, K key, V value)
- Specified by:
addAsyncin interfaceRStreamAsync<K,V>
-
addAsync
public RFuture<StreamMessageId> addAsync(K key, V value, int trimLen, boolean trimStrict)
- Specified by:
addAsyncin interfaceRStreamAsync<K,V>
-
addAsync
public RFuture<Void> addAsync(StreamMessageId id, K key, V value, int trimLen, boolean trimStrict)
- Specified by:
addAsyncin interfaceRStreamAsync<K,V>
-
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:
readAsyncin 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:
readAsyncin interfaceRStreamAsync<K,V>
-
rangeAsync
public RFuture<Map<StreamMessageId,Map<K,V>>> rangeAsync(int count, StreamMessageId startId, StreamMessageId endId)
Description copied from interface:RStreamAsyncReturns stream data in range by specified start Stream ID (included) and end Stream ID (included).- Specified by:
rangeAsyncin 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:RStreamReturns 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:RStreamAsyncReturns stream data in reverse order in range by specified start Stream ID (included) and end Stream ID (included).- Specified by:
rangeReversedAsyncin 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:RStreamReturns stream data in reverse order in range by specified start Stream Message ID (included) and end Stream Message ID (included).- Specified by:
rangeReversedin 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:
readAsyncin interfaceRStreamAsync<K,V>
-
readAsync
public RFuture<Map<StreamMessageId,Map<K,V>>> readAsync(long timeout, TimeUnit unit, StreamMessageId... ids)
- Specified by:
readAsyncin interfaceRStreamAsync<K,V>
-
rangeAsync
public RFuture<Map<StreamMessageId,Map<K,V>>> rangeAsync(StreamMessageId startId, StreamMessageId endId)
Description copied from interface:RStreamAsyncReturns stream data in range by specified start Stream ID (included) and end Stream ID (included).- Specified by:
rangeAsyncin 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:RStreamAsyncReturns stream data in reverse order in range by specified start Stream ID (included) and end Stream ID (included).- Specified by:
rangeReversedAsyncin 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:RStreamReturns 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:RStreamReturns stream data in reverse order in range by specified start Stream Message ID (included) and end Stream Message ID (included).- Specified by:
rangeReversedin 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:RStreamAsyncRemoves messages by id.- Specified by:
removeAsyncin interfaceRStreamAsync<K,V>- Parameters:
ids- - id of messages to remove- Returns:
- deleted messages amount
-
remove
public long remove(StreamMessageId... ids)
Description copied from interface:RStreamRemoves messages by id.
-
trim
public long trim(TrimStrategy strategy, int threshold)
Description copied from interface:RStreamTrims stream to specified size
-
trimNonStrict
public long trimNonStrict(TrimStrategy strategy, int threshold, int limit)
Description copied from interface:RStreamTrims stream using almost exact trimming threshold up to limit.- Specified by:
trimNonStrictin 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:RStreamAsyncTrims stream to specified size- Specified by:
trimAsyncin 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:RStreamAsyncTrims stream using almost exact trimming threshold up to limit.- Specified by:
trimNonStrictAsyncin interfaceRStreamAsync<K,V>- Parameters:
strategy- - trim strategythreshold- - trim thresholdlimit- - trim limit- Returns:
- number of deleted messages
-
trimNonStrict
public long trimNonStrict(TrimStrategy strategy, int threshold)
Description copied from interface:RStreamTrims stream using almost exact trimming threshold.- Specified by:
trimNonStrictin interfaceRStream<K,V>- Parameters:
strategy- - trim strategythreshold- - trim threshold- Returns:
- number of deleted messages
-
trimNonStrictAsync
public RFuture<Long> trimNonStrictAsync(TrimStrategy strategy, int threshold)
Description copied from interface:RStreamAsyncTrims stream using almost exact trimming threshold.- Specified by:
trimNonStrictAsyncin 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:RStreamAsyncTrims stream using MAXLEN strategy to specified size- Specified by:
trimAsyncin 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:RStreamAsyncTrims stream using MAXLEN strategy to almost exact trimming threshold.- Specified by:
trimNonStrictAsyncin interfaceRStreamAsync<K,V>- Parameters:
count- - new size of stream- Returns:
- number of deleted messages
-
trim
public long trim(int count)
Description copied from interface:RStreamTrims stream using MAXLEN strategy to specified size
-
trimNonStrict
public long trimNonStrict(int count)
Description copied from interface:RStreamTrims stream using MAXLEN strategy to almost exact trimming threshold..- Specified by:
trimNonStrictin interfaceRStream<K,V>- Parameters:
count- - new size of stream- Returns:
- number of deleted messages
-
removeGroupAsync
public RFuture<Void> removeGroupAsync(String groupName)
Description copied from interface:RStreamAsyncRemoves group by name.- Specified by:
removeGroupAsyncin interfaceRStreamAsync<K,V>- Parameters:
groupName- - name of group- Returns:
- void
-
removeGroup
public void removeGroup(String groupName)
Description copied from interface:RStreamRemoves group by name.- Specified by:
removeGroupin interfaceRStream<K,V>- Parameters:
groupName- - name of group
-
createConsumer
public void createConsumer(String groupName, String consumerName)
Description copied from interface:RStreamCreates consumer of the group by name.Requires Redis 6.2.0 and higher.
- Specified by:
createConsumerin interfaceRStream<K,V>- Parameters:
groupName- - name of groupconsumerName- - name of consumer
-
createConsumerAsync
public RFuture<Void> createConsumerAsync(String groupName, String consumerName)
Description copied from interface:RStreamAsyncCreates consumer of the group by name.Requires Redis 6.2.0 and higher.
- Specified by:
createConsumerAsyncin interfaceRStreamAsync<K,V>- Parameters:
groupName- - name of groupconsumerName- - name of consumer
-
removeConsumerAsync
public RFuture<Long> removeConsumerAsync(String groupName, String consumerName)
Description copied from interface:RStreamAsyncRemoves consumer of the group by name.- Specified by:
removeConsumerAsyncin 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:RStreamRemoves consumer of the group by name.- Specified by:
removeConsumerin 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:RStreamAsyncUpdates next message id delivered to consumers.- Specified by:
updateGroupMessageIdAsyncin 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:RStreamUpdates next message id delivered to consumers.- Specified by:
updateGroupMessageIdin interfaceRStream<K,V>- Parameters:
groupName- - name of groupid- - Stream Message ID
-
getInfo
public StreamInfo<K,V> getInfo()
Description copied from interface:RStreamReturns information about this stream.
-
getInfoAsync
public RFuture<StreamInfo<K,V>> getInfoAsync()
Description copied from interface:RStreamAsyncReturns information about this stream.- Specified by:
getInfoAsyncin interfaceRStreamAsync<K,V>- Returns:
- info object
-
listGroups
public List<StreamGroup> listGroups()
Description copied from interface:RStreamReturns list of common info about groups belonging to this stream.- Specified by:
listGroupsin interfaceRStream<K,V>- Returns:
- list of info objects
-
listGroupsAsync
public RFuture<List<StreamGroup>> listGroupsAsync()
Description copied from interface:RStreamAsyncReturns list of objects with information about groups belonging to this stream.- Specified by:
listGroupsAsyncin interfaceRStreamAsync<K,V>- Returns:
- list of info objects
-
listConsumers
public List<StreamConsumer> listConsumers(String groupName)
Description copied from interface:RStreamReturns list of common info about group customers for specifiedgroupName.- Specified by:
listConsumersin 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:RStreamAsyncReturns list of objects with information about group customers for specifiedgroupName.- Specified by:
listConsumersAsyncin 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:RStreamAsyncReturns stream data of pending messages by group name. Limited by start Stream Message ID and end Stream Message ID and count.StreamMessageId.MAXis used as max Stream Message IDStreamMessageId.MINis used as min Stream Message ID- Specified by:
pendingRangeAsyncin 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:RStreamAsyncReturns stream data of pending messages by group and customer name. Limited by start Stream Message ID and end Stream Message ID and count.StreamMessageId.MAXis used as max Stream Message IDStreamMessageId.MINis used as min Stream Message ID- Specified by:
pendingRangeAsyncin 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:RStreamAsyncReturns stream data of pending messages by group name. Limited by minimum idle time, messages count, start and end Stream Message IDs.StreamMessageId.MAXis used as max Stream Message IDStreamMessageId.MINis used as min Stream Message IDRequires Redis 6.2.0 and higher.
- Specified by:
pendingRangeAsyncin 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:RStreamAsyncReturns stream data of pending messages by group and customer name. Limited by minimum idle time, messages count, start and end Stream Message IDs.StreamMessageId.MAXis used as max Stream Message IDStreamMessageId.MINis used as min Stream Message IDRequires Redis 6.2.0 and higher.
- Specified by:
pendingRangeAsyncin 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:RStreamReturns stream data of pending messages by group name. Limited by minimum idle time, messages count, start and end Stream Message IDs.StreamMessageId.MAXis used as max Stream Message IDStreamMessageId.MINis used as min Stream Message IDRequires Redis 6.2.0 and higher.
- Specified by:
pendingRangein 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:RStreamReturns stream data of pending messages by group and customer name. Limited by minimum idle time, messages count, start and end Stream Message IDs.StreamMessageId.MAXis used as max Stream Message IDStreamMessageId.MINis used as min Stream Message IDRequires Redis 6.2.0 and higher.
- Specified by:
pendingRangein 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:RStreamReturns stream data of pending messages by group and customer name. Limited by start Stream Message ID and end Stream Message ID and count.StreamMessageId.MAXis used as max Stream Message IDStreamMessageId.MINis used as min Stream Message ID- Specified by:
pendingRangein 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:RStreamReturns stream data of pending messages by group name. Limited by start Stream Message ID and end Stream Message ID and count.StreamMessageId.MAXis used as max Stream Message IDStreamMessageId.MINis used as min Stream Message ID- Specified by:
pendingRangein 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)
-
expire
public boolean expire(long timeToLive, TimeUnit timeUnit)Description copied from interface:RExpirableSet a timeout for object. After the timeout has expired, the key will automatically be deleted.- Specified by:
expirein interfaceRExpirable- Parameters:
timeToLive- - timeout before object will be deletedtimeUnit- - timeout time unit- Returns:
trueif the timeout was set andfalseif not
-
expireAsync
public RFuture<Boolean> expireAsync(long timeToLive, TimeUnit timeUnit)
Description copied from interface:RExpirableAsyncSet a timeout for object in async mode. After the timeout has expired, the key will automatically be deleted.- Specified by:
expireAsyncin interfaceRExpirableAsync- Parameters:
timeToLive- - timeout before object will be deletedtimeUnit- - timeout time unit- Returns:
trueif the timeout was set andfalseif not
-
expireAt
public boolean expireAt(long timestamp)
Description copied from interface:RExpirableUseRExpirable.expire(Instant)instead- Specified by:
expireAtin interfaceRExpirable- Parameters:
timestamp- - expire date in milliseconds (Unix timestamp)- Returns:
trueif the timeout was set andfalseif not
-
expireAtAsync
public RFuture<Boolean> expireAtAsync(long timestamp)
Description copied from interface:RExpirableAsyncUseRExpirableAsync.expireAsync(Instant)instead- Specified by:
expireAtAsyncin interfaceRExpirableAsync- Parameters:
timestamp- - expire date in milliseconds (Unix timestamp)- Returns:
trueif the timeout was set andfalseif not
-
expire
public boolean expire(Instant instant)
Description copied from interface:RExpirableSet an expire date for object. When expire date comes the key will automatically be deleted.- Specified by:
expirein interfaceRExpirable- Parameters:
instant- - expire date- Returns:
trueif the timeout was set andfalseif not
-
expireAsync
public RFuture<Boolean> expireAsync(Instant instant)
Description copied from interface:RExpirableAsyncSet an expire date for object. When expire date comes the key will automatically be deleted.- Specified by:
expireAsyncin interfaceRExpirableAsync- Parameters:
instant- - expire date- Returns:
trueif the timeout was set andfalseif not
-
expireAt
public boolean expireAt(Date timestamp)
Description copied from interface:RExpirableUseRExpirable.expire(Instant)instead- Specified by:
expireAtin interfaceRExpirable- Parameters:
timestamp- - expire date- Returns:
trueif the timeout was set andfalseif not
-
expireAtAsync
public RFuture<Boolean> expireAtAsync(Date timestamp)
Description copied from interface:RExpirableAsyncUseRExpirableAsync.expireAsync(Instant)instead- Specified by:
expireAtAsyncin interfaceRExpirableAsync- Parameters:
timestamp- - expire date- Returns:
trueif the timeout was set andfalseif not
-
clearExpire
public boolean clearExpire()
Description copied from interface:RExpirableClear an expire timeout or expire date for object.- Specified by:
clearExpirein interfaceRExpirable- Returns:
trueif timeout was removedfalseif object does not exist or does not have an associated timeout
-
clearExpireAsync
public RFuture<Boolean> clearExpireAsync()
Description copied from interface:RExpirableAsyncClear an expire timeout or expire date for object in async mode. Object will not be deleted.- Specified by:
clearExpireAsyncin interfaceRExpirableAsync- Returns:
trueif the timeout was cleared andfalseif not
-
remainTimeToLive
public long remainTimeToLive()
Description copied from interface:RExpirableRemaining time to live of Redisson object that has a timeout- Specified by:
remainTimeToLivein 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:RExpirableAsyncRemaining time to live of Redisson object that has a timeout- Specified by:
remainTimeToLiveAsyncin 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)
-
-