Class RedissonStream<K,V>
- Type Parameters:
K- key typeV- value type
- All Implemented Interfaces:
RExpirable,RExpirableAsync,RObject,RObjectAsync,RStream<K,,V> RStreamAsync<K,V>
- Author:
- Nikita Koksharov
-
Field Summary
Fields inherited from class org.redisson.RedissonObject
codec, commandExecutor, name -
Constructor Summary
ConstructorsConstructorDescriptionRedissonStream(Codec codec, CommandAsyncExecutor connectionManager, String name) RedissonStream(CommandAsyncExecutor connectionManager, String name) -
Method Summary
Modifier and TypeMethodDescriptionlongack(String groupName, StreamMessageId... id) Marks pending messages by group name and streamidsas correctly processed.ackAsync(String groupName, StreamMessageId... ids) Marks pending messages by group name and streamidsas correctly processed.add(StreamAddArgs<K, V> args) Appends a new entry/entries and returns generated Stream Message IDvoidadd(StreamMessageId id, StreamAddArgs<K, V> args) Appends a new entry/entries by specified Stream Message IDaddAsync(StreamAddArgs<K, V> args) Appends a new entry/entries and returns generated Stream Message IDaddAsync(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) intaddListener(ObjectListener listener) Adds object event listeneraddListenerAsync(ObjectListener listener) Adds object event listenerautoClaim(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.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 voidprotected 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.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.booleanClear an expire timeout or expire date for object.Clear an expire timeout or expire date for object in async mode.clearExpireAsync(String... keys) voidcreateConsumer(String groupName, String consumerName) Creates consumer of the group by name.createConsumerAsync(String groupName, String consumerName) Creates consumer of the group by name.voidCreates consumer group.Creates consumer group.booleanUseRExpirable.expire(Duration)insteadbooleanSets a timeout for this object.booleanSets an expiration date for this object.expireAsync(long timeToLive, TimeUnit timeUnit) UseRExpirableAsync.expireAsync(Duration)insteadexpireAsync(long timeToLive, TimeUnit timeUnit, String param, String... keys) expireAsync(Duration duration) Set a timeout for object.expireAsync(Instant instant) Set an expire date for object.booleanexpireAt(long timestamp) UseRExpirable.expire(Instant)insteadbooleanUseRExpirable.expire(Instant)insteadexpireAtAsync(long timestamp) UseRExpirableAsync.expireAsync(Instant)insteadexpireAtAsync(long timestamp, String param, String... keys) expireAtAsync(Date timestamp) UseRExpirableAsync.expireAsync(Instant)insteadbooleanexpireIfGreater(Duration duration) Sets a timeout for this object only if it's greater than timeout set before.booleanexpireIfGreater(Instant time) Sets an expiration date for this object only if it's greater than expiration date set before.expireIfGreaterAsync(Duration duration) Sets a timeout for this object only if it's greater than timeout set before.expireIfGreaterAsync(Instant time) Sets an expiration date for this object only if it's greater than expiration date set before.booleanexpireIfLess(Duration duration) Sets a timeout for this object only if it's less than timeout set before.booleanexpireIfLess(Instant time) Sets an expiration date for this object only if it's less than expiration date set before.expireIfLessAsync(Duration duration) Sets a timeout for this object only if it's less than timeout set before.expireIfLessAsync(Instant time) Sets an expiration date for this object only if it's less than expiration date set before.booleanexpireIfNotSet(Duration duration) Sets a timeout for this object only if it hasn't been set before.booleanexpireIfNotSet(Instant time) Sets an expiration date for this object only if it hasn't been set before.expireIfNotSetAsync(Duration duration) Sets a timeout for this object only if it hasn't been set before.expireIfNotSetAsync(Instant time) Sets an expiration date for this object only if it hasn't been set before.booleanexpireIfSet(Duration duration) Sets a timeout for this object only if it has been already set.booleanexpireIfSet(Instant time) Sets an expiration date for this object only if it has been already set.expireIfSetAsync(Duration duration) Sets a timeout for this object only if it has been already set.expireIfSetAsync(Instant time) Sets an expiration date for this object only if it has been already set.fastAutoClaim(String groupName, String consumerName, long idleTime, TimeUnit idleTimeUnit, StreamMessageId startId, int count) Transfers ownership of pending messages by id to a new consumer by name if idle time of messages and startId are greater than defined value.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.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.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.longExpiration time of Redisson object that has a timeoutExpiration time of Redisson object that has a timeoutStreamInfo<K, V> getInfo()Returns information about this stream.RFuture<StreamInfo<K, V>> Returns information about this stream.getPendingInfo(String groupName) Returns common info about pending messages by group name.getPendingInfoAsync(String groupName) Returns common info about pending messages by group name.listConsumers(String groupName) Returns list of common info about group customers for specifiedgroupName.listConsumersAsync(String groupName) Returns list of objects with information about group customers for specifiedgroupName.Returns list of common info about groups belonging to this stream.Returns list of objects with information about groups belonging to this stream.listPending(String groupName, String consumerName, StreamMessageId startId, StreamMessageId endId, int count) Returns list of common info about pending messages by group and consumer name.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.listPending(String groupName, StreamMessageId startId, StreamMessageId endId, int count) Returns list of common info about pending messages by group name.listPending(String groupName, StreamMessageId startId, StreamMessageId endId, long idleTime, TimeUnit idleTimeUnit, int count) Returns stream data of pending messages by group name.listPendingAsync(String groupName, String consumerName, StreamMessageId startId, StreamMessageId endId, int count) Returns list of common info about pending messages by group and consumer name.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.listPendingAsync(String groupName, StreamMessageId startId, StreamMessageId endId, int count) Returns list of common info about pending messages by group name.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.pendingRangeAsync(String groupName, String consumerName, StreamMessageId startId, StreamMessageId endId, int count) Returns stream data of pending messages by group and customer name.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.pendingRangeAsync(String groupName, StreamMessageId startId, StreamMessageId endId, int count) Returns stream data of pending messages by group name.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).rangeAsync(int count, StreamMessageId startId, StreamMessageId endId) Returns stream data in range by specified start Stream ID (included) and end Stream ID (included).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).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).rangeReversedAsync(StreamMessageId startId, StreamMessageId endId) Returns stream data in reverse order in range by specified start Stream ID (included) and end Stream ID (included).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.readAsync(StreamMultiReadArgs args) Read stream data from multiple streams including current.readAsync(StreamReadArgs args) Read stream data from current stream only.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.readGroupAsync(String groupName, String consumerName, StreamMultiReadGroupArgs args) Read stream data from consumer group and multiple streams including current.readGroupAsync(String groupName, String consumerName, StreamReadGroupArgs args) Read stream data from consumer group and current stream only.longRemaining time to live of Redisson object that has a timeoutRemaining time to live of Redisson object that has a timeoutlongremove(StreamMessageId... ids) Removes messages by id.removeAsync(StreamMessageId... ids) Removes messages by id.longremoveConsumer(String groupName, String consumerName) Removes consumer of the group by name.removeConsumerAsync(String groupName, String consumerName) Removes consumer of the group by name.voidremoveGroup(String groupName) Removes group by name.removeGroupAsync(String groupName) Removes group by name.voidremoveListener(int listenerId) Removes object event listenerremoveListenerAsync(int listenerId) Removes object event listenerlongsize()Returns number of entries in streamReturns number of entries in streamlongtrim(StreamTrimArgs args) Trims stream using strict trimming.trimAsync(StreamTrimArgs args) longtrimNonStrict(StreamTrimArgs args) Trims stream using non-strict trimming.voidupdateGroupMessageId(String groupName, StreamMessageId id) Updates next message id delivered to consumers.updateGroupMessageIdAsync(String groupName, StreamMessageId id) Updates next message id delivered to consumers.Methods inherited from class org.redisson.RedissonObject
addListener, addListenerAsync, addTrackingListener, addTrackingListenerAsync, copy, copyAsync, delete, deleteAsync, deleteAsync, dump, dumpAsync, encode, encode, encode, encode, encodeMapKey, encodeMapKey, encodeMapKeys, encodeMapValue, encodeMapValues, get, getCodec, getIdleTime, getIdleTimeAsync, getLockByMapKey, getLockByValue, getName, getRawName, getRawName, getServiceManager, getSubscribeService, isExists, isExistsAsync, map, migrate, migrateAsync, move, moveAsync, prefixName, removeListener, removeListenerAsync, removeListenerAsync, removeTrackingListener, removeTrackingListenerAsync, rename, renameAsync, renamenx, renamenxAsync, restore, restore, restoreAndReplace, restoreAndReplace, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, setName, sizeInMemory, sizeInMemoryAsync, sizeInMemoryAsync, sizeInMemoryAsync, suffixName, toSeconds, toStream, touch, touchAsync, unlink, unlinkAsyncMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.redisson.api.RExpirable
clearExpire, expire, expire, expire, expireAt, expireAt, expireIfGreater, expireIfGreater, expireIfLess, expireIfLess, expireIfNotSet, expireIfNotSet, expireIfSet, expireIfSet, getExpireTime, remainTimeToLiveMethods inherited from interface org.redisson.api.RExpirableAsync
clearExpireAsync, expireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, expireIfGreaterAsync, expireIfGreaterAsync, expireIfLessAsync, expireIfLessAsync, expireIfNotSetAsync, expireIfNotSetAsync, expireIfSetAsync, expireIfSetAsync, getExpireTimeAsync, remainTimeToLiveAsyncMethods inherited from interface org.redisson.api.RObject
copy, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlinkMethods inherited from interface org.redisson.api.RObjectAsync
copyAsync, deleteAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsync
-
Constructor Details
-
RedissonStream
-
RedissonStream
-
-
Method Details
-
checkKey
-
checkValue
-
createGroup
Description copied from interface:RStreamCreates consumer group.Usage examples:
StreamMessageId id = stream.createGroup(StreamCreateGroupArgs.name("test").id(id).makeStream());- Specified by:
createGroupin interfaceRStream<K,V> - Parameters:
args- method arguments object
-
createGroupAsync
Description copied from interface:RStreamAsyncCreates consumer group.Usage examples:
StreamMessageId id = stream.createGroup(StreamCreateGroupArgs.name("test").id(id).makeStream());- Specified by:
createGroupAsyncin interfaceRStreamAsync<K,V> - Parameters:
args- method arguments object
-
ackAsync
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
Description copied from interface:RStreamMarks pending messages by group name and streamidsas correctly processed. -
getPendingInfoAsync
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
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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, readGroupMap<K, V>>> (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, readGroupV>> (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, readGroupAsyncMap<K, V>>>> (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> - Parameters:
args- - method arguments object- Returns:
- stream data mapped by stream name and Stream Message ID
-
readGroupAsync
public RFuture<Map<StreamMessageId,Map<K, readGroupAsyncV>>> (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> - Parameters:
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, claimAsyncV>>> (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, claimV>> (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. -
size
public long size()Description copied from interface:RStreamReturns number of entries in stream -
sizeAsync
Description copied from interface:RStreamAsyncReturns number of entries in stream- Specified by:
sizeAsyncin interfaceRStreamAsync<K,V> - Returns:
- size of stream
-
read
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
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
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
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
-
add
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
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
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
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
-
rangeAsync
public RFuture<Map<StreamMessageId,Map<K, rangeAsyncV>>> (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, rangeV>> (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, rangeReversedAsyncV>>> (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, rangeReversedV>> (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
-
rangeAsync
public RFuture<Map<StreamMessageId,Map<K, rangeAsyncV>>> (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, rangeReversedAsyncV>>> (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
-
range
Description copied from interface:RStreamReturns stream data in range by specified start Stream Message ID (included) and end Stream Message ID (included). -
rangeReversed
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
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
Description copied from interface:RStreamRemoves messages by id. -
removeGroupAsync
Description copied from interface:RStreamAsyncRemoves group by name.- Specified by:
removeGroupAsyncin interfaceRStreamAsync<K,V> - Parameters:
groupName- - name of group- Returns:
- void
-
removeGroup
Description copied from interface:RStreamRemoves group by name.- Specified by:
removeGroupin interfaceRStream<K,V> - Parameters:
groupName- - name of group
-
createConsumer
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
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
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
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
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
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
Description copied from interface:RStreamReturns information about this stream. -
getInfoAsync
Description copied from interface:RStreamAsyncReturns information about this stream.- Specified by:
getInfoAsyncin interfaceRStreamAsync<K,V> - Returns:
- info object
-
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
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
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
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, pendingRangeAsyncV>>> (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:
-
pendingRangeAsync
public RFuture<Map<StreamMessageId,Map<K, pendingRangeAsyncV>>> (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:
-
pendingRangeAsync
public RFuture<Map<StreamMessageId,Map<K, pendingRangeAsyncV>>> (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:
-
pendingRangeAsync
public RFuture<Map<StreamMessageId,Map<K, pendingRangeAsyncV>>> (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:
-
pendingRange
public Map<StreamMessageId,Map<K, pendingRangeV>> (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:
-
pendingRange
public Map<StreamMessageId,Map<K, pendingRangeV>> (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:
-
pendingRange
public Map<StreamMessageId,Map<K, pendingRangeV>> (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:
-
pendingRange
public Map<StreamMessageId,Map<K, pendingRangeV>> (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:
-
trim
Description copied from interface:RStreamTrims stream using strict trimming.Usage example:
long result = stream.trim(StreamTrimArgs.maxLen(100).noLimit());
-
trimAsync
- Specified by:
trimAsyncin interfaceRStreamAsync<K,V>
-
trimNonStrict
Description copied from interface:RStreamTrims stream using non-strict trimming.Usage example:
long result = stream.trimNonStrict(StreamTrimArgs.maxLen(100).noLimit());
- Specified by:
trimNonStrictin interfaceRStream<K,V> - Parameters:
args- - method arguments object- Returns:
- number of deleted messages
-
trimNonStrictAsync
- Specified by:
trimNonStrictAsyncin interfaceRStreamAsync<K,V>
-
addListenerAsync
Description copied from interface:RObjectAsyncAdds object event listener- Specified by:
addListenerAsyncin interfaceRObjectAsync- Specified by:
addListenerAsyncin interfaceRStreamAsync<K,V> - Overrides:
addListenerAsyncin classRedissonObject- Parameters:
listener- - object event listener- Returns:
- listener id
- See Also:
-
addListener
Description copied from interface:RObjectAdds object event listener- Specified by:
addListenerin interfaceRObject- Specified by:
addListenerin interfaceRStream<K,V> - Overrides:
addListenerin classRedissonObject- Parameters:
listener- - object event listener- Returns:
- listener id
- See Also:
-
removeListener
public void removeListener(int listenerId) Description copied from interface:RObjectRemoves object event listener- Specified by:
removeListenerin interfaceRObject- Overrides:
removeListenerin classRedissonObject- Parameters:
listenerId- - listener id
-
removeListenerAsync
Description copied from interface:RObjectAsyncRemoves object event listener- Specified by:
removeListenerAsyncin interfaceRObjectAsync- Overrides:
removeListenerAsyncin classRedissonObject- Parameters:
listenerId- - listener id
-
expire
Description copied from interface:RExpirableUseRExpirable.expire(Duration)instead- Specified by:
expirein interfaceRExpirable- Parameters:
timeToLive- - timeout before object will be deletedtimeUnit- - timeout time unit- Returns:
trueif the timeout was set andfalseif not
-
expireAsync
Description copied from interface:RExpirableAsyncUseRExpirableAsync.expireAsync(Duration)instead- 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
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
Description copied from interface:RExpirableSets an expiration date for this 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
-
expireIfSet
Description copied from interface:RExpirableSets an expiration date for this object only if it has been already set. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfSetin interfaceRExpirable- Parameters:
time- expire date- Returns:
trueif the timeout was set andfalseif not
-
expireIfSetAsync
Description copied from interface:RExpirableAsyncSets an expiration date for this object only if it has been already set. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfSetAsyncin interfaceRExpirableAsync- Parameters:
time- expire date- Returns:
trueif the timeout was set andfalseif not
-
expireIfNotSet
Description copied from interface:RExpirableSets an expiration date for this object only if it hasn't been set before. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfNotSetin interfaceRExpirable- Parameters:
time- expire date- Returns:
trueif the timeout was set andfalseif not
-
expireIfNotSetAsync
Description copied from interface:RExpirableAsyncSets an expiration date for this object only if it hasn't been set before. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfNotSetAsyncin interfaceRExpirableAsync- Parameters:
time- expire date- Returns:
trueif the timeout was set andfalseif not
-
expireIfGreater
Description copied from interface:RExpirableSets an expiration date for this object only if it's greater than expiration date set before. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfGreaterin interfaceRExpirable- Parameters:
time- expire date- Returns:
trueif the timeout was set andfalseif not
-
expireIfGreaterAsync
Description copied from interface:RExpirableAsyncSets an expiration date for this object only if it's greater than expiration date set before. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfGreaterAsyncin interfaceRExpirableAsync- Parameters:
time- expire date- Returns:
trueif the timeout was set andfalseif not
-
expireIfLess
Description copied from interface:RExpirableSets an expiration date for this object only if it's less than expiration date set before. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfLessin interfaceRExpirable- Parameters:
time- expire date- Returns:
trueif the timeout was set andfalseif not
-
expireIfLessAsync
Description copied from interface:RExpirableAsyncSets an expiration date for this object only if it's less than expiration date set before. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfLessAsyncin interfaceRExpirableAsync- Parameters:
time- expire date- Returns:
trueif the timeout was set andfalseif not
-
expireAsync
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
-
expire
Description copied from interface:RExpirableSets a timeout for this object. After the timeout has expired, the key will automatically be deleted.- Specified by:
expirein interfaceRExpirable- Parameters:
duration- timeout before object will be deleted- Returns:
trueif the timeout was set andfalseif not
-
expireAsync
Description copied from interface:RExpirableAsyncSet a timeout for object. After the timeout has expired, the key will automatically be deleted.- Specified by:
expireAsyncin interfaceRExpirableAsync- Parameters:
duration- timeout before object will be deleted- Returns:
trueif the timeout was set andfalseif not
-
expireAt
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
Description copied from interface:RExpirableAsyncUseRExpirableAsync.expireAsync(Instant)instead- Specified by:
expireAtAsyncin interfaceRExpirableAsync- Parameters:
timestamp- - expire date- Returns:
trueif the timeout was set andfalseif not
-
expireIfSet
Description copied from interface:RExpirableSets a timeout for this object only if it has been already set. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfSetin interfaceRExpirable- Parameters:
duration- timeout before object will be deleted- Returns:
trueif the timeout was set andfalseif not
-
expireIfSetAsync
Description copied from interface:RExpirableAsyncSets a timeout for this object only if it has been already set. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfSetAsyncin interfaceRExpirableAsync- Parameters:
duration- timeout before object will be deleted- Returns:
trueif the timeout was set andfalseif not
-
expireIfNotSet
Description copied from interface:RExpirableSets a timeout for this object only if it hasn't been set before. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfNotSetin interfaceRExpirable- Parameters:
duration- timeout before object will be deleted- Returns:
trueif the timeout was set andfalseif not
-
expireIfNotSetAsync
Description copied from interface:RExpirableAsyncSets a timeout for this object only if it hasn't been set before. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfNotSetAsyncin interfaceRExpirableAsync- Parameters:
duration- timeout before object will be deleted- Returns:
trueif the timeout was set andfalseif not
-
expireIfGreater
Description copied from interface:RExpirableSets a timeout for this object only if it's greater than timeout set before. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfGreaterin interfaceRExpirable- Parameters:
duration- timeout before object will be deleted- Returns:
trueif the timeout was set andfalseif not
-
expireIfGreaterAsync
Description copied from interface:RExpirableAsyncSets a timeout for this object only if it's greater than timeout set before. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfGreaterAsyncin interfaceRExpirableAsync- Parameters:
duration- timeout before object will be deleted- Returns:
trueif the timeout was set andfalseif not
-
expireIfLess
Description copied from interface:RExpirableSets a timeout for this object only if it's less than timeout set before. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfLessin interfaceRExpirable- Parameters:
duration- timeout before object will be deleted- Returns:
trueif the timeout was set andfalseif not
-
expireIfLessAsync
Description copied from interface:RExpirableAsyncSets a timeout for this object only if it's less than timeout set before. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfLessAsyncin interfaceRExpirableAsync- Parameters:
duration- timeout before object will be deleted- 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
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
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.
-
getExpireTime
public long getExpireTime()Description copied from interface:RExpirableExpiration time of Redisson object that has a timeoutRequires Redis 7.0.0 and higher.
- Specified by:
getExpireTimein interfaceRExpirable- Returns:
- expiration time
-
getExpireTimeAsync
Description copied from interface:RExpirableAsyncExpiration time of Redisson object that has a timeoutRequires Redis 7.0.0 and higher.
- Specified by:
getExpireTimeAsyncin interfaceRExpirableAsync- Returns:
- expiration time
-
expireAsync
-
expireAtAsync
-
clearExpireAsync
-