Package org.redisson
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
-
-
Constructor Summary
Constructors Constructor Description RedissonStream(Codec codec, CommandAsyncExecutor connectionManager, String name)
RedissonStream(CommandAsyncExecutor connectionManager, String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Long
ack(String groupName, StreamId... id)
Marks pending messages by group name and streamids
as correctly processed.RFuture<Long>
ackAsync(String groupName, StreamId... ids)
Marks pending messages by group name and streamids
as correctly processed.StreamId
add(K key, V value)
Appends a new entry and returns generated Stream IDStreamId
add(K key, V value, int trimLen, boolean trimStrict)
Appends a new entry and returns generated Stream ID.void
add(StreamId id, K key, V value)
Appends a new entry by specified Stream IDvoid
add(StreamId id, K key, V value, int trimLen, boolean trimStrict)
Appends a new entry by specified Stream ID.StreamId
addAll(Map<K,V> entries)
Appends new entries and returns generated Stream IDStreamId
addAll(Map<K,V> entries, int trimLen, boolean trimStrict)
Appends new entries and returns generated Stream ID.void
addAll(StreamId id, Map<K,V> entries)
Appends new entries by specified Stream IDvoid
addAll(StreamId id, Map<K,V> entries, int trimLen, boolean trimStrict)
Appends new entries by specified Stream ID.RFuture<StreamId>
addAllAsync(Map<K,V> entries)
Appends new entries and returns generated Stream IDRFuture<StreamId>
addAllAsync(Map<K,V> entries, int trimLen, boolean trimStrict)
Appends new entries and returns generated Stream ID.RFuture<Void>
addAllAsync(StreamId id, Map<K,V> entries)
Appends new entries by specified Stream IDRFuture<Void>
addAllAsync(StreamId id, Map<K,V> entries, int trimLen, boolean trimStrict)
Appends new entries by specified Stream ID.RFuture<StreamId>
addAsync(K key, V value)
Appends a new entry and returns generated Stream IDRFuture<StreamId>
addAsync(K key, V value, int trimLen, boolean trimStrict)
Appends a new entry and returns generated Stream ID.RFuture<Void>
addAsync(StreamId id, K key, V value)
Appends a new entry by specified Stream IDRFuture<Void>
addAsync(StreamId id, K key, V value, int trimLen, boolean trimStrict)
Appends a new entry by specified Stream ID.protected void
checkKey(Object key)
protected void
checkValue(Object value)
RFuture<Map<StreamId,Map<K,V>>>
claimAsync(String groupName, String consumerName, long idleTime, TimeUnit idleTimeUnit, StreamId... ids)
Transfers ownership of pending messages by id to a new consumer by name if idle time of messages is greater than defined value.Map<StreamId,Map<K,V>>
claimPending(String groupName, String consumerName, long idleTime, TimeUnit idleTimeUnit, StreamId... ids)
Transfers ownership of pending messages by id to a new consumer by name if idle time of messages is greater than defined value.boolean
clearExpire()
Clear an expire timeout or expire date for object.RFuture<Boolean>
clearExpireAsync()
Clear an expire timeout or expire date for object in async mode.void
createGroup(String groupName)
Creates consumer group by name.void
createGroup(String groupName, StreamId id)
Creates consumer group by name and stream id.RFuture<Void>
createGroupAsync(String groupName)
Creates consumer group by name.RFuture<Void>
createGroupAsync(String groupName, StreamId id)
Creates consumer group by name and stream id.boolean
expire(long timeToLive, TimeUnit timeUnit)
Set a timeout for object.RFuture<Boolean>
expireAsync(long timeToLive, TimeUnit timeUnit)
Set a timeout for object in async mode.boolean
expireAt(long timestamp)
Set an expire date for object.boolean
expireAt(Date timestamp)
Set an expire date for object.RFuture<Boolean>
expireAtAsync(long timestamp)
Set an expire date for object in async mode.RFuture<Boolean>
expireAtAsync(Date timestamp)
Set an expire date for object in async mode.PendingResult
listPending(String groupName)
Returns pending messages by group nameList<PendingEntry>
listPending(String groupName, StreamId startId, StreamId endId, int count)
Returns list of pending messages by group name.List<PendingEntry>
listPending(String groupName, StreamId startId, StreamId endId, int count, String consumerName)
Returns list of pending messages by group name and consumer name.RFuture<PendingResult>
listPendingAsync(String groupName)
Returns pending messages by group nameRFuture<List<PendingEntry>>
listPendingAsync(String groupName, StreamId startId, StreamId endId, int count)
Returns list of pending messages by group name.RFuture<List<PendingEntry>>
listPendingAsync(String groupName, StreamId startId, StreamId endId, int count, String consumerName)
Returns list of pending messages by group name and consumer name.Map<StreamId,Map<K,V>>
range(int count, StreamId startId, StreamId endId)
Read stream data in range by specified start Stream ID (included) and end Stream ID (included).Map<StreamId,Map<K,V>>
range(StreamId startId, StreamId endId)
Read stream data in range by specified start Stream ID (included) and end Stream ID (included).RFuture<Map<StreamId,Map<K,V>>>
rangeAsync(int count, StreamId startId, StreamId endId)
Read stream data in range by specified start Stream ID (included) and end Stream ID (included).RFuture<Map<StreamId,Map<K,V>>>
rangeAsync(StreamId startId, StreamId endId)
Read stream data in range by specified start Stream ID (included) and end Stream ID (included).Map<StreamId,Map<K,V>>
rangeReversed(int count, StreamId startId, StreamId endId)
Read stream data in reverse order in range by specified start Stream ID (included) and end Stream ID (included).Map<StreamId,Map<K,V>>
rangeReversed(StreamId startId, StreamId endId)
Read stream data in reverse order in range by specified start Stream ID (included) and end Stream ID (included).RFuture<Map<StreamId,Map<K,V>>>
rangeReversedAsync(int count, StreamId startId, StreamId endId)
Read stream data in reverse order in range by specified start Stream ID (included) and end Stream ID (included).RFuture<Map<StreamId,Map<K,V>>>
rangeReversedAsync(StreamId startId, StreamId endId)
Read stream data in reverse order in range by specified start Stream ID (included) and end Stream ID (included).Map<StreamId,Map<K,V>>
read(int count, long timeout, TimeUnit unit, StreamId... ids)
Read stream data by specified collection of Stream IDs.Map<String,Map<StreamId,Map<K,V>>>
read(int count, long timeout, TimeUnit unit, StreamId id, String key2, StreamId id2)
Read stream data by specified stream name including this stream.Map<String,Map<StreamId,Map<K,V>>>
read(int count, long timeout, TimeUnit unit, StreamId id, String key2, StreamId id2, String key3, StreamId id3)
Read stream data by specified stream names including this stream.Map<String,Map<StreamId,Map<K,V>>>
read(int count, long timeout, TimeUnit unit, StreamId id, Map<String,StreamId> keyToId)
Read stream data by specified stream id mapped by name including this stream.Map<StreamId,Map<K,V>>
read(int count, StreamId... ids)
Read stream data by specified collection of Stream IDs.Map<String,Map<StreamId,Map<K,V>>>
read(int count, StreamId id, String key2, StreamId id2)
Read stream data by specified stream name including this stream.Map<String,Map<StreamId,Map<K,V>>>
read(int count, StreamId id, String key2, StreamId id2, String key3, StreamId id3)
Read stream data by specified stream names including this stream.Map<String,Map<StreamId,Map<K,V>>>
read(int count, StreamId id, Map<String,StreamId> keyToId)
Read stream data by specified stream id mapped by name including this stream.Map<StreamId,Map<K,V>>
read(long timeout, TimeUnit unit, StreamId... ids)
Read stream data by specified collection of Stream IDs.Map<String,Map<StreamId,Map<K,V>>>
read(long timeout, TimeUnit unit, StreamId id, String key2, StreamId id2)
Read stream data by specified stream name including this stream.Map<String,Map<StreamId,Map<K,V>>>
read(long timeout, TimeUnit unit, StreamId id, String key2, StreamId id2, String key3, StreamId id3)
Read stream data by specified stream names including this stream.Map<String,Map<StreamId,Map<K,V>>>
read(long timeout, TimeUnit unit, StreamId id, Map<String,StreamId> keyToId)
Read stream data by specified stream id mapped by name including this stream.Map<StreamId,Map<K,V>>
read(StreamId... ids)
Read stream data by specified collection of Stream IDs.Map<String,Map<StreamId,Map<K,V>>>
read(StreamId id, String key2, StreamId id2)
Read stream data by specified stream name including this stream.Map<String,Map<StreamId,Map<K,V>>>
read(StreamId id, String key2, StreamId id2, String key3, StreamId id3)
Read stream data by specified stream names including this stream.Map<String,Map<StreamId,Map<K,V>>>
read(StreamId id, Map<String,StreamId> keyToId)
Read stream data by specified stream id mapped by name including this stream.RFuture<Map<StreamId,Map<K,V>>>
readAsync(int count, long timeout, TimeUnit unit, StreamId... ids)
Read stream data by specified collection of Stream IDs.RFuture<Map<String,Map<StreamId,Map<K,V>>>>
readAsync(int count, long timeout, TimeUnit unit, StreamId id, String key2, StreamId id2)
Read stream data by specified stream name including this stream.RFuture<Map<String,Map<StreamId,Map<K,V>>>>
readAsync(int count, long timeout, TimeUnit unit, StreamId id, String key2, StreamId id2, String key3, StreamId id3)
Read stream data by specified stream names including this stream.RFuture<Map<String,Map<StreamId,Map<K,V>>>>
readAsync(int count, long timeout, TimeUnit unit, StreamId id, Map<String,StreamId> keyToId)
Read stream data by specified stream id mapped by name including this stream.RFuture<Map<StreamId,Map<K,V>>>
readAsync(int count, StreamId... ids)
Read stream data by specified collection of Stream IDs.RFuture<Map<String,Map<StreamId,Map<K,V>>>>
readAsync(int count, StreamId id, String key2, StreamId id2)
Read stream data by specified stream name including this stream.RFuture<Map<String,Map<StreamId,Map<K,V>>>>
readAsync(int count, StreamId id, String key2, StreamId id2, String key3, StreamId id3)
Read stream data by specified stream names including this stream.RFuture<Map<String,Map<StreamId,Map<K,V>>>>
readAsync(int count, StreamId id, Map<String,StreamId> keyToId)
Read stream data by specified stream id mapped by name including this stream.RFuture<Map<StreamId,Map<K,V>>>
readAsync(long timeout, TimeUnit unit, StreamId... ids)
Read stream data by specified collection of Stream IDs.RFuture<Map<String,Map<StreamId,Map<K,V>>>>
readAsync(long timeout, TimeUnit unit, StreamId id, String key2, StreamId id2)
Read stream data by specified stream name including this stream.RFuture<Map<String,Map<StreamId,Map<K,V>>>>
readAsync(long timeout, TimeUnit unit, StreamId id, String key2, StreamId id2, String key3, StreamId id3)
Read stream data by specified stream names including this stream.RFuture<Map<String,Map<StreamId,Map<K,V>>>>
readAsync(long timeout, TimeUnit unit, StreamId id, Map<String,StreamId> keyToId)
Read stream data by specified stream id mapped by name including this stream.RFuture<Map<StreamId,Map<K,V>>>
readAsync(StreamId... ids)
Read stream data by specified collection of Stream IDs.RFuture<Map<String,Map<StreamId,Map<K,V>>>>
readAsync(StreamId id, String key2, StreamId id2)
Read stream data by specified stream name including this stream.RFuture<Map<String,Map<StreamId,Map<K,V>>>>
readAsync(StreamId id, String key2, StreamId id2, String key3, StreamId id3)
Read stream data by specified stream names including this stream.RFuture<Map<String,Map<StreamId,Map<K,V>>>>
readAsync(StreamId id, Map<String,StreamId> keyToId)
Read stream data by specified stream id mapped by name including this stream.Map<StreamId,Map<K,V>>
readGroup(String groupName, String consumerName, int count, long timeout, TimeUnit unit, StreamId... ids)
Read stream data fromgroupName
byconsumerName
and specified collection of Stream IDs.Map<StreamId,Map<K,V>>
readGroup(String groupName, String consumerName, int count, StreamId... ids)
Read stream data fromgroupName
byconsumerName
and specified collection of Stream IDs.Map<StreamId,Map<K,V>>
readGroup(String groupName, String consumerName, long timeout, TimeUnit unit, StreamId... ids)
Read stream data fromgroupName
byconsumerName
and specified collection of Stream IDs.Map<StreamId,Map<K,V>>
readGroup(String groupName, String consumerName, StreamId... ids)
Read stream data fromgroupName
byconsumerName
and specified collection of Stream IDs.RFuture<Map<StreamId,Map<K,V>>>
readGroupAsync(String groupName, String consumerName, int count, long timeout, TimeUnit unit, StreamId... ids)
Read stream data fromgroupName
byconsumerName
and specified collection of Stream IDs.RFuture<Map<StreamId,Map<K,V>>>
readGroupAsync(String groupName, String consumerName, int count, StreamId... ids)
Read stream data fromgroupName
byconsumerName
and specified collection of Stream IDs.RFuture<Map<StreamId,Map<K,V>>>
readGroupAsync(String groupName, String consumerName, long timeout, TimeUnit unit, StreamId... ids)
Read stream data fromgroupName
byconsumerName
and specified collection of Stream IDs.RFuture<Map<StreamId,Map<K,V>>>
readGroupAsync(String groupName, String consumerName, StreamId... ids)
Read stream data fromgroupName
byconsumerName
and specified collection of Stream IDs.long
remainTimeToLive()
Remaining time to live of Redisson object that has a timeoutRFuture<Long>
remainTimeToLiveAsync()
Remaining time to live of Redisson object that has a timeoutlong
size()
Returns number of entries in streamRFuture<Long>
sizeAsync()
Returns number of entries in stream-
Methods inherited from class org.redisson.RedissonObject
await, copy, copyAsync, delete, deleteAsync, dump, dumpAsync, encode, encode, encode, encodeMapKey, encodeMapKeys, encodeMapValue, encodeMapValues, get, getCodec, getName, getName, isExists, isExistsAsync, migrate, migrateAsync, move, moveAsync, prefixName, rename, renameAsync, renamenx, renamenxAsync, restore, restore, restoreAndReplace, restoreAndReplace, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, suffixName, toSeconds, 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, expireAt, expireAt, remainTimeToLive
-
Methods inherited from interface org.redisson.api.RExpirableAsync
clearExpireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsync
-
Methods inherited from interface org.redisson.api.RObject
copy, delete, dump, getCodec, getName, isExists, migrate, move, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, touch, unlink
-
Methods inherited from interface org.redisson.api.RObjectAsync
copyAsync, deleteAsync, dumpAsync, isExistsAsync, migrateAsync, moveAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, touchAsync, unlinkAsync
-
-
-
-
Constructor Detail
-
RedissonStream
public RedissonStream(Codec codec, CommandAsyncExecutor connectionManager, String name)
-
RedissonStream
public RedissonStream(CommandAsyncExecutor connectionManager, String name)
-
-
Method Detail
-
checkKey
protected void checkKey(Object key)
-
checkValue
protected void checkValue(Object value)
-
createGroup
public void createGroup(String groupName)
Description copied from interface:RStream
Creates consumer group by name.- Specified by:
createGroup
in interfaceRStream<K,V>
- Parameters:
groupName
- - name of group
-
createGroupAsync
public RFuture<Void> createGroupAsync(String groupName)
Description copied from interface:RStreamAsync
Creates consumer group by name.- Specified by:
createGroupAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of group- Returns:
- void
-
createGroup
public void createGroup(String groupName, StreamId id)
Description copied from interface:RStream
Creates consumer group by name and stream id. Only new messages after defined streamid
will be available for consumers of this group.StreamId.NEWEST
is used for messages arrived since the moment of group creating- Specified by:
createGroup
in interfaceRStream<K,V>
- Parameters:
groupName
- - name of groupid
- - stream id
-
createGroupAsync
public RFuture<Void> createGroupAsync(String groupName, StreamId id)
Description copied from interface:RStreamAsync
Creates consumer group by name and stream id. Only new messages after defined streamid
will be available for consumers of this group.StreamId.NEWEST
is used for messages arrived since the moment of group creating- Specified by:
createGroupAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of groupid
- - stream id- Returns:
- void
-
ackAsync
public RFuture<Long> ackAsync(String groupName, StreamId... ids)
Description copied from interface:RStreamAsync
Marks pending messages by group name and streamids
as correctly processed.- Specified by:
ackAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of groupids
- - stream ids- Returns:
- marked messages amount
-
ack
public Long ack(String groupName, StreamId... id)
Description copied from interface:RStream
Marks pending messages by group name and streamids
as correctly processed.
-
listPendingAsync
public RFuture<PendingResult> listPendingAsync(String groupName)
Description copied from interface:RStreamAsync
Returns pending messages by group name- Specified by:
listPendingAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of group- Returns:
- result object
-
listPending
public PendingResult listPending(String groupName)
Description copied from interface:RStream
Returns pending messages by group name- Specified by:
listPending
in interfaceRStream<K,V>
- Parameters:
groupName
- - name of group- Returns:
- result object
-
listPendingAsync
public RFuture<List<PendingEntry>> listPendingAsync(String groupName, StreamId startId, StreamId endId, int count, String consumerName)
Description copied from interface:RStreamAsync
Returns list of pending messages by group name and consumer name. Limited by start stream id and end stream id and count.StreamId.MAX
is used as max stream idStreamId.MIN
is used as min stream id- Specified by:
listPendingAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of groupstartId
- - start stream idendId
- - end stream idcount
- - amount of messagesconsumerName
- - name of consumer- Returns:
- list
-
listPendingAsync
public RFuture<List<PendingEntry>> listPendingAsync(String groupName, StreamId startId, StreamId endId, int count)
Description copied from interface:RStreamAsync
Returns list of pending messages by group name. Limited by start stream id and end stream id and count.StreamId.MAX
is used as max stream idStreamId.MIN
is used as min stream id- Specified by:
listPendingAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of groupstartId
- - start stream idendId
- - end stream idcount
- - amount of messages- Returns:
- list
-
listPending
public List<PendingEntry> listPending(String groupName, StreamId startId, StreamId endId, int count)
Description copied from interface:RStream
Returns list of pending messages by group name. Limited by start stream id and end stream id and count.StreamId.MAX
is used as max stream idStreamId.MIN
is used as min stream id- Specified by:
listPending
in interfaceRStream<K,V>
- Parameters:
groupName
- - name of groupstartId
- - start stream idendId
- - end stream idcount
- - amount of messages- Returns:
- list
-
listPending
public List<PendingEntry> listPending(String groupName, StreamId startId, StreamId endId, int count, String consumerName)
Description copied from interface:RStream
Returns list of pending messages by group name and consumer name. Limited by start stream id and end stream id and count.StreamId.MAX
is used as max stream idStreamId.MIN
is used as min stream id- Specified by:
listPending
in interfaceRStream<K,V>
- Parameters:
groupName
- - name of groupstartId
- - start stream idendId
- - end stream idcount
- - amount of messagesconsumerName
- - name of consumer- Returns:
- list
-
claimAsync
public RFuture<Map<StreamId,Map<K,V>>> claimAsync(String groupName, String consumerName, long idleTime, TimeUnit idleTimeUnit, StreamId... ids)
Description copied from interface:RStreamAsync
Transfers ownership of pending messages by id to a new consumer by name if idle time of messages is greater than defined value.- Specified by:
claimAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of groupconsumerName
- - name of consumeridleTime
- - minimum idle time of messagesidleTimeUnit
- - idle time unitids
- - stream ids- Returns:
-
claimPending
public Map<StreamId,Map<K,V>> claimPending(String groupName, String consumerName, long idleTime, TimeUnit idleTimeUnit, StreamId... ids)
Description copied from interface:RStream
Transfers ownership of pending messages by id to a new consumer by name if idle time of messages is greater than defined value.- Specified by:
claimPending
in interfaceRStream<K,V>
- Parameters:
groupName
- - name of groupconsumerName
- - name of consumeridleTime
- - minimum idle time of messagesidleTimeUnit
- - idle time unitids
- - stream ids- Returns:
-
readGroupAsync
public RFuture<Map<StreamId,Map<K,V>>> readGroupAsync(String groupName, String consumerName, StreamId... ids)
Description copied from interface:RStreamAsync
Read stream data fromgroupName
byconsumerName
and specified collection of Stream IDs.- Specified by:
readGroupAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of groupconsumerName
- - name of consumerids
- - collection of Stream IDs- Returns:
- stream data mapped by Stream ID
-
readGroupAsync
public RFuture<Map<StreamId,Map<K,V>>> readGroupAsync(String groupName, String consumerName, int count, StreamId... ids)
Description copied from interface:RStreamAsync
Read stream data fromgroupName
byconsumerName
and specified collection of Stream IDs.- Specified by:
readGroupAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of groupconsumerName
- - name of consumercount
- - stream data size limitids
- - collection of Stream IDs- Returns:
- stream data mapped by Stream ID
-
readGroupAsync
public RFuture<Map<StreamId,Map<K,V>>> readGroupAsync(String groupName, String consumerName, long timeout, TimeUnit unit, StreamId... ids)
Description copied from interface:RStreamAsync
Read stream data fromgroupName
byconsumerName
and specified collection of Stream IDs. Wait for stream data availability for specifiedtimeout
interval.- Specified by:
readGroupAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of groupconsumerName
- - name of consumertimeout
- - time interval to wait for stream data availabilityunit
- - time interval unitids
- - collection of Stream IDs- Returns:
- stream data mapped by Stream ID
-
readGroupAsync
public RFuture<Map<StreamId,Map<K,V>>> readGroupAsync(String groupName, String consumerName, int count, long timeout, TimeUnit unit, StreamId... ids)
Description copied from interface:RStreamAsync
Read stream data fromgroupName
byconsumerName
and specified collection of Stream IDs. Wait for stream data availability for specifiedtimeout
interval.- Specified by:
readGroupAsync
in interfaceRStreamAsync<K,V>
- Parameters:
groupName
- - name of groupconsumerName
- - name of consumercount
- - stream data size limittimeout
- - time interval to wait for stream data availabilityunit
- - time interval unitids
- - collection of Stream IDs- Returns:
- stream data mapped by Stream ID
-
readGroup
public Map<StreamId,Map<K,V>> readGroup(String groupName, String consumerName, StreamId... ids)
Description copied from interface:RStream
Read stream data fromgroupName
byconsumerName
and specified collection of Stream IDs.
-
readGroup
public Map<StreamId,Map<K,V>> readGroup(String groupName, String consumerName, int count, StreamId... ids)
Description copied from interface:RStream
Read stream data fromgroupName
byconsumerName
and specified collection of Stream IDs.
-
readGroup
public Map<StreamId,Map<K,V>> readGroup(String groupName, String consumerName, long timeout, TimeUnit unit, StreamId... ids)
Description copied from interface:RStream
Read stream data fromgroupName
byconsumerName
and specified collection of Stream IDs. Wait for stream data availability for specifiedtimeout
interval.
-
readGroup
public Map<StreamId,Map<K,V>> readGroup(String groupName, String consumerName, int count, long timeout, TimeUnit unit, StreamId... ids)
Description copied from interface:RStream
Read stream data fromgroupName
byconsumerName
and specified collection of Stream IDs. Wait for stream data availability for specifiedtimeout
interval.- Specified by:
readGroup
in interfaceRStream<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
-
addAll
public StreamId addAll(Map<K,V> entries)
Description copied from interface:RStream
Appends new entries and returns generated Stream ID
-
addAllAsync
public RFuture<StreamId> addAllAsync(Map<K,V> entries)
Description copied from interface:RStreamAsync
Appends new entries and returns generated Stream ID- Specified by:
addAllAsync
in interfaceRStreamAsync<K,V>
- Parameters:
entries
- - entries to add- Returns:
- Stream ID
-
addAll
public void addAll(StreamId id, Map<K,V> entries)
Description copied from interface:RStream
Appends new entries by specified Stream ID
-
addAllAsync
public RFuture<Void> addAllAsync(StreamId id, Map<K,V> entries)
Description copied from interface:RStreamAsync
Appends new entries by specified Stream ID- Specified by:
addAllAsync
in interfaceRStreamAsync<K,V>
- Parameters:
id
- - Stream IDentries
- - entries to add- Returns:
- void
-
addAll
public StreamId addAll(Map<K,V> entries, int trimLen, boolean trimStrict)
Description copied from interface:RStream
Appends new entries and returns generated Stream ID. Trims stream to a specifiedtrimLen
size. IftrimStrict
isfalse
then trims to few tens of entries more than specified length to trim.
-
addAllAsync
public RFuture<StreamId> addAllAsync(Map<K,V> entries, int trimLen, boolean trimStrict)
Description copied from interface:RStreamAsync
Appends new entries and returns generated Stream ID. Trims stream to a specifiedtrimLen
size. IftrimStrict
isfalse
then trims to few tens of entries more than specified length to trim.- Specified by:
addAllAsync
in interfaceRStreamAsync<K,V>
- Parameters:
entries
- - entries to addtrimLen
- - length to trimtrimStrict
- - iffalse
then trims to few tens of entries more than specified length to trim- Returns:
- Stream ID
-
addAll
public void addAll(StreamId id, Map<K,V> entries, int trimLen, boolean trimStrict)
Description copied from interface:RStream
Appends new entries by specified Stream ID. Trims stream to a specifiedtrimLen
size. IftrimStrict
isfalse
then trims to few tens of entries more than specified length to trim.
-
addAllAsync
public RFuture<Void> addAllAsync(StreamId id, Map<K,V> entries, int trimLen, boolean trimStrict)
Description copied from interface:RStreamAsync
Appends new entries by specified Stream ID. Trims stream to a specifiedtrimLen
size. IftrimStrict
isfalse
then trims to few tens of entries more than specified length to trim.- Specified by:
addAllAsync
in interfaceRStreamAsync<K,V>
- Parameters:
id
- - Stream IDentries
- - entries to addtrimLen
- - length to trimtrimStrict
- - iffalse
then trims to few tens of entries more than specified length to trim- Returns:
- void
-
size
public long size()
Description copied from interface:RStream
Returns number of entries in stream
-
sizeAsync
public RFuture<Long> sizeAsync()
Description copied from interface:RStreamAsync
Returns number of entries in stream- Specified by:
sizeAsync
in interfaceRStreamAsync<K,V>
- Returns:
- size of stream
-
read
public Map<StreamId,Map<K,V>> read(int count, StreamId... ids)
Description copied from interface:RStream
Read stream data by specified collection of Stream IDs.
-
readAsync
public RFuture<Map<String,Map<StreamId,Map<K,V>>>> readAsync(int count, StreamId id, Map<String,StreamId> keyToId)
Description copied from interface:RStreamAsync
Read stream data by specified stream id mapped by name including this stream.- Specified by:
readAsync
in interfaceRStreamAsync<K,V>
- Parameters:
count
- - stream data size limitid
- - id of this streamkeyToId
- - stream id mapped by name- Returns:
- stream data mapped by key and Stream ID
-
read
public Map<StreamId,Map<K,V>> read(int count, long timeout, TimeUnit unit, StreamId... ids)
Description copied from interface:RStream
Read stream data by specified collection of Stream IDs. Wait for stream data availability for specifiedtimeout
interval.
-
readAsync
public RFuture<Map<String,Map<StreamId,Map<K,V>>>> readAsync(int count, long timeout, TimeUnit unit, StreamId id, Map<String,StreamId> keyToId)
Description copied from interface:RStreamAsync
Read stream data by specified stream id mapped by name including this stream. Wait for the first stream data availability for specifiedtimeout
interval.- Specified by:
readAsync
in interfaceRStreamAsync<K,V>
- Parameters:
count
- - stream data size limittimeout
- - time interval to wait for stream data availabilityunit
- - time interval unitid
- - id of this streamkeyToId
- - stream id mapped by name- Returns:
- stream data mapped by key and Stream ID
-
addAsync
public RFuture<StreamId> addAsync(K key, V value)
Description copied from interface:RStreamAsync
Appends a new entry and returns generated Stream ID- Specified by:
addAsync
in interfaceRStreamAsync<K,V>
- Parameters:
key
- - key of entryvalue
- - value of entry- Returns:
- Stream ID
-
addAsync
public RFuture<Void> addAsync(StreamId id, K key, V value)
Description copied from interface:RStreamAsync
Appends a new entry by specified Stream ID- Specified by:
addAsync
in interfaceRStreamAsync<K,V>
- Parameters:
id
- - Stream IDkey
- - key of entryvalue
- - value of entry- Returns:
- void
-
addAsync
public RFuture<StreamId> addAsync(K key, V value, int trimLen, boolean trimStrict)
Description copied from interface:RStreamAsync
Appends a new entry and returns generated Stream ID. Trims stream to a specifiedtrimLen
size. IftrimStrict
isfalse
then trims to few tens of entries more than specified length to trim.- Specified by:
addAsync
in interfaceRStreamAsync<K,V>
- Parameters:
key
- - key of entryvalue
- - value of entrytrimLen
- - length to trimtrimStrict
- - iffalse
then trims to few tens of entries more than specified length to trim- Returns:
- Stream ID
-
addAsync
public RFuture<Void> addAsync(StreamId id, K key, V value, int trimLen, boolean trimStrict)
Description copied from interface:RStreamAsync
Appends a new entry by specified Stream ID. Trims stream to a specifiedtrimLen
size. IftrimStrict
isfalse
then trims to few tens of entries more than specified length to trim.- Specified by:
addAsync
in interfaceRStreamAsync<K,V>
- Parameters:
id
- - Stream IDkey
- - key of entryvalue
- - value of entrytrimLen
- - length to trimtrimStrict
- - iffalse
then trims to few tens of entries more than specified length to trim- Returns:
- void
-
add
public StreamId add(K key, V value)
Description copied from interface:RStream
Appends a new entry and returns generated Stream ID
-
add
public void add(StreamId id, K key, V value)
Description copied from interface:RStream
Appends a new entry by specified Stream ID
-
add
public StreamId add(K key, V value, int trimLen, boolean trimStrict)
Description copied from interface:RStream
Appends a new entry and returns generated Stream ID. Trims stream to a specifiedtrimLen
size. IftrimStrict
isfalse
then trims to few tens of entries more than specified length to trim.
-
add
public void add(StreamId id, K key, V value, int trimLen, boolean trimStrict)
Description copied from interface:RStream
Appends a new entry by specified Stream ID. Trims stream to a specifiedtrimLen
size. IftrimStrict
isfalse
then trims to few tens of entries more than specified length to trim.
-
readAsync
public RFuture<Map<StreamId,Map<K,V>>> readAsync(int count, StreamId... ids)
Description copied from interface:RStreamAsync
Read stream data by specified collection of Stream IDs.- Specified by:
readAsync
in interfaceRStreamAsync<K,V>
- Parameters:
count
- - stream data size limitids
- - collection of Stream IDs- Returns:
- stream data mapped by Stream ID
-
readAsync
public RFuture<Map<StreamId,Map<K,V>>> readAsync(int count, long timeout, TimeUnit unit, StreamId... ids)
Description copied from interface:RStreamAsync
Read stream data by specified collection of Stream IDs. Wait for stream data availability for specifiedtimeout
interval.- Specified by:
readAsync
in interfaceRStreamAsync<K,V>
- Parameters:
count
- - stream data size limittimeout
- - time interval to wait for stream data availabilityunit
- - time interval unitids
- - collection of Stream IDs- Returns:
- stream data mapped by Stream ID
-
read
public Map<String,Map<StreamId,Map<K,V>>> read(int count, StreamId id, Map<String,StreamId> keyToId)
Description copied from interface:RStream
Read stream data by specified stream id mapped by name including this stream.
-
read
public Map<String,Map<StreamId,Map<K,V>>> read(int count, long timeout, TimeUnit unit, StreamId id, Map<String,StreamId> keyToId)
Description copied from interface:RStream
Read stream data by specified stream id mapped by name including this stream. Wait for the first stream data availability for specifiedtimeout
interval.
-
rangeAsync
public RFuture<Map<StreamId,Map<K,V>>> rangeAsync(int count, StreamId startId, StreamId endId)
Description copied from interface:RStreamAsync
Read stream data in range by specified start Stream ID (included) and end Stream ID (included).- Specified by:
rangeAsync
in interfaceRStreamAsync<K,V>
- Parameters:
count
- - stream data size limitstartId
- - start Stream IDendId
- - end Stream ID- Returns:
- stream data mapped by Stream ID
-
range
public Map<StreamId,Map<K,V>> range(int count, StreamId startId, StreamId endId)
Description copied from interface:RStream
Read stream data in range by specified start Stream ID (included) and end Stream ID (included).
-
rangeReversedAsync
public RFuture<Map<StreamId,Map<K,V>>> rangeReversedAsync(int count, StreamId startId, StreamId endId)
Description copied from interface:RStreamAsync
Read stream data in reverse order in range by specified start Stream ID (included) and end Stream ID (included).- Specified by:
rangeReversedAsync
in interfaceRStreamAsync<K,V>
- Parameters:
count
- - stream data size limitstartId
- - start Stream IDendId
- - end Stream ID- Returns:
- stream data mapped by Stream ID
-
rangeReversed
public Map<StreamId,Map<K,V>> rangeReversed(int count, StreamId startId, StreamId endId)
Description copied from interface:RStream
Read stream data in reverse order in range by specified start Stream ID (included) and end Stream ID (included).- Specified by:
rangeReversed
in interfaceRStream<K,V>
- Parameters:
count
- - stream data size limitstartId
- - start Stream IDendId
- - end Stream ID- Returns:
- stream data mapped by Stream ID
-
readAsync
public RFuture<Map<StreamId,Map<K,V>>> readAsync(StreamId... ids)
Description copied from interface:RStreamAsync
Read stream data by specified collection of Stream IDs.- Specified by:
readAsync
in interfaceRStreamAsync<K,V>
- Parameters:
ids
- - collection of Stream IDs- Returns:
- stream data mapped by Stream ID
-
readAsync
public RFuture<Map<StreamId,Map<K,V>>> readAsync(long timeout, TimeUnit unit, StreamId... ids)
Description copied from interface:RStreamAsync
Read stream data by specified collection of Stream IDs. Wait for stream data availability for specifiedtimeout
interval.- Specified by:
readAsync
in interfaceRStreamAsync<K,V>
- Parameters:
timeout
- - time interval to wait for stream data availabilityunit
- - time interval unitids
- - collection of Stream IDs- Returns:
- stream data mapped by Stream ID
-
readAsync
public RFuture<Map<String,Map<StreamId,Map<K,V>>>> readAsync(StreamId id, Map<String,StreamId> keyToId)
Description copied from interface:RStreamAsync
Read stream data by specified stream id mapped by name including this stream.- Specified by:
readAsync
in interfaceRStreamAsync<K,V>
- Parameters:
id
- - id of this streamkeyToId
- - stream id mapped by name- Returns:
- stream data mapped by key and Stream ID
-
readAsync
public RFuture<Map<String,Map<StreamId,Map<K,V>>>> readAsync(long timeout, TimeUnit unit, StreamId id, Map<String,StreamId> keyToId)
Description copied from interface:RStreamAsync
Read stream data by specified stream id mapped by name including this stream. Wait for the first stream data availability for specifiedtimeout
interval.- Specified by:
readAsync
in interfaceRStreamAsync<K,V>
- Parameters:
timeout
- - time interval to wait for stream data availabilityunit
- - time interval unitid
- - id of this streamkeyToId
- - stream id mapped by name- Returns:
- stream data mapped by key and Stream ID
-
rangeAsync
public RFuture<Map<StreamId,Map<K,V>>> rangeAsync(StreamId startId, StreamId endId)
Description copied from interface:RStreamAsync
Read stream data in range by specified start Stream ID (included) and end Stream ID (included).- Specified by:
rangeAsync
in interfaceRStreamAsync<K,V>
- Parameters:
startId
- - start Stream IDendId
- - end Stream ID- Returns:
- stream data mapped by Stream ID
-
rangeReversedAsync
public RFuture<Map<StreamId,Map<K,V>>> rangeReversedAsync(StreamId startId, StreamId endId)
Description copied from interface:RStreamAsync
Read stream data in reverse order in range by specified start Stream ID (included) and end Stream ID (included).- Specified by:
rangeReversedAsync
in interfaceRStreamAsync<K,V>
- Parameters:
startId
- - start Stream IDendId
- - end Stream ID- Returns:
- stream data mapped by Stream ID
-
read
public Map<StreamId,Map<K,V>> read(StreamId... ids)
Description copied from interface:RStream
Read stream data by specified collection of Stream IDs.
-
read
public Map<StreamId,Map<K,V>> read(long timeout, TimeUnit unit, StreamId... ids)
Description copied from interface:RStream
Read stream data by specified collection of Stream IDs. Wait for stream data availability for specifiedtimeout
interval.
-
read
public Map<String,Map<StreamId,Map<K,V>>> read(StreamId id, Map<String,StreamId> keyToId)
Description copied from interface:RStream
Read stream data by specified stream id mapped by name including this stream.
-
read
public Map<String,Map<StreamId,Map<K,V>>> read(long timeout, TimeUnit unit, StreamId id, Map<String,StreamId> keyToId)
Description copied from interface:RStream
Read stream data by specified stream id mapped by name including this stream. Wait for the first stream data availability for specifiedtimeout
interval.
-
range
public Map<StreamId,Map<K,V>> range(StreamId startId, StreamId endId)
Description copied from interface:RStream
Read stream data in range by specified start Stream ID (included) and end Stream ID (included).
-
rangeReversed
public Map<StreamId,Map<K,V>> rangeReversed(StreamId startId, StreamId endId)
Description copied from interface:RStream
Read stream data in reverse order in range by specified start Stream ID (included) and end Stream ID (included).- Specified by:
rangeReversed
in interfaceRStream<K,V>
- Parameters:
startId
- - start Stream IDendId
- - end Stream ID- Returns:
- stream data mapped by Stream ID
-
readAsync
public RFuture<Map<String,Map<StreamId,Map<K,V>>>> readAsync(StreamId id, String key2, StreamId id2)
Description copied from interface:RStreamAsync
Read stream data by specified stream name including this stream.- Specified by:
readAsync
in interfaceRStreamAsync<K,V>
- Parameters:
id
- - id of this streamkey2
- - name of second streamid2
- - id of second stream- Returns:
- stream data mapped by key and Stream ID
-
readAsync
public RFuture<Map<String,Map<StreamId,Map<K,V>>>> readAsync(StreamId id, String key2, StreamId id2, String key3, StreamId id3)
Description copied from interface:RStreamAsync
Read stream data by specified stream names including this stream.- Specified by:
readAsync
in interfaceRStreamAsync<K,V>
- Parameters:
id
- - id of this streamkey2
- - name of second streamid2
- - id of second streamkey3
- - name of third streamid3
- - id of third stream- Returns:
- stream data mapped by key and Stream ID
-
readAsync
public RFuture<Map<String,Map<StreamId,Map<K,V>>>> readAsync(int count, StreamId id, String key2, StreamId id2)
Description copied from interface:RStreamAsync
Read stream data by specified stream name including this stream.- Specified by:
readAsync
in interfaceRStreamAsync<K,V>
- Parameters:
count
- - stream data size limitid
- - id of this streamkey2
- - name of second streamid2
- - id of second stream- Returns:
- stream data mapped by key and Stream ID
-
readAsync
public RFuture<Map<String,Map<StreamId,Map<K,V>>>> readAsync(int count, StreamId id, String key2, StreamId id2, String key3, StreamId id3)
Description copied from interface:RStreamAsync
Read stream data by specified stream names including this stream.- Specified by:
readAsync
in interfaceRStreamAsync<K,V>
- Parameters:
count
- - stream data size limitid
- - id of this streamkey2
- - name of second streamid2
- - id of second streamkey3
- - name of third streamid3
- - id of third stream- Returns:
- stream data mapped by key and Stream ID
-
readAsync
public RFuture<Map<String,Map<StreamId,Map<K,V>>>> readAsync(long timeout, TimeUnit unit, StreamId id, String key2, StreamId id2)
Description copied from interface:RStreamAsync
Read stream data by specified stream name including this stream. Wait for the first stream data availability for specifiedtimeout
interval.- Specified by:
readAsync
in interfaceRStreamAsync<K,V>
- Parameters:
timeout
- - time interval to wait for stream data availabilityunit
- - time interval unitid
- - id of this streamkey2
- - name of second streamid2
- - id of second stream- Returns:
- stream data mapped by key and Stream ID
-
readAsync
public RFuture<Map<String,Map<StreamId,Map<K,V>>>> readAsync(long timeout, TimeUnit unit, StreamId id, String key2, StreamId id2, String key3, StreamId id3)
Description copied from interface:RStreamAsync
Read stream data by specified stream names including this stream. Wait for the first stream data availability for specifiedtimeout
interval.- Specified by:
readAsync
in interfaceRStreamAsync<K,V>
- Parameters:
timeout
- - time interval to wait for stream data availabilityunit
- - time interval unitid
- - id of this streamkey2
- - name of second streamid2
- - id of second streamkey3
- - name of third streamid3
- - id of third stream- Returns:
- stream data mapped by key and Stream ID
-
readAsync
public RFuture<Map<String,Map<StreamId,Map<K,V>>>> readAsync(int count, long timeout, TimeUnit unit, StreamId id, String key2, StreamId id2)
Description copied from interface:RStreamAsync
Read stream data by specified stream name including this stream. Wait for the first stream data availability for specifiedtimeout
interval.- Specified by:
readAsync
in interfaceRStreamAsync<K,V>
- Parameters:
count
- - stream data size limittimeout
- - time interval to wait for stream data availabilityunit
- - time interval unitid
- - id of this streamkey2
- - name of second streamid2
- - id of second stream- Returns:
- stream data mapped by key and Stream ID
-
readAsync
public RFuture<Map<String,Map<StreamId,Map<K,V>>>> readAsync(int count, long timeout, TimeUnit unit, StreamId id, String key2, StreamId id2, String key3, StreamId id3)
Description copied from interface:RStreamAsync
Read stream data by specified stream names including this stream. Wait for the first stream data availability for specifiedtimeout
interval.- Specified by:
readAsync
in interfaceRStreamAsync<K,V>
- Parameters:
count
- - stream data size limittimeout
- - time interval to wait for stream data availabilityunit
- - time interval unitid
- - id of this streamkey2
- - name of second streamid2
- - id of second streamkey3
- - name of third streamid3
- - id of third stream- Returns:
- stream data mapped by key and Stream ID
-
read
public Map<String,Map<StreamId,Map<K,V>>> read(StreamId id, String key2, StreamId id2)
Description copied from interface:RStream
Read stream data by specified stream name including this stream.
-
read
public Map<String,Map<StreamId,Map<K,V>>> read(StreamId id, String key2, StreamId id2, String key3, StreamId id3)
Description copied from interface:RStream
Read stream data by specified stream names including this stream.
-
read
public Map<String,Map<StreamId,Map<K,V>>> read(int count, StreamId id, String key2, StreamId id2)
Description copied from interface:RStream
Read stream data by specified stream name including this stream.
-
read
public Map<String,Map<StreamId,Map<K,V>>> read(int count, StreamId id, String key2, StreamId id2, String key3, StreamId id3)
Description copied from interface:RStream
Read stream data by specified stream names including this stream.
-
read
public Map<String,Map<StreamId,Map<K,V>>> read(long timeout, TimeUnit unit, StreamId id, String key2, StreamId id2)
Description copied from interface:RStream
Read stream data by specified stream name including this stream. Wait for the first stream data availability for specifiedtimeout
interval.
-
read
public Map<String,Map<StreamId,Map<K,V>>> read(long timeout, TimeUnit unit, StreamId id, String key2, StreamId id2, String key3, StreamId id3)
Description copied from interface:RStream
Read stream data by specified stream names including this stream. Wait for the first stream data availability for specifiedtimeout
interval.- Specified by:
read
in interfaceRStream<K,V>
- Parameters:
timeout
- - time interval to wait for stream data availabilityunit
- - time interval unitid
- - id of this streamkey2
- - name of second streamid2
- - id of second streamkey3
- - name of third streamid3
- - id of third stream- Returns:
- stream data mapped by key and Stream ID
-
read
public Map<String,Map<StreamId,Map<K,V>>> read(int count, long timeout, TimeUnit unit, StreamId id, String key2, StreamId id2)
Description copied from interface:RStream
Read stream data by specified stream name including this stream. Wait for the first stream data availability for specifiedtimeout
interval.- Specified by:
read
in interfaceRStream<K,V>
- Parameters:
count
- - stream data size limittimeout
- - time interval to wait for stream data availabilityunit
- - time interval unitid
- - id of this streamkey2
- - name of second streamid2
- - id of second stream- Returns:
- stream data mapped by key and Stream ID
-
read
public Map<String,Map<StreamId,Map<K,V>>> read(int count, long timeout, TimeUnit unit, StreamId id, String key2, StreamId id2, String key3, StreamId id3)
Description copied from interface:RStream
Read stream data by specified stream names including this stream. Wait for the first stream data availability for specifiedtimeout
interval.- Specified by:
read
in interfaceRStream<K,V>
- Parameters:
count
- - stream data size limittimeout
- - time interval to wait for stream data availabilityunit
- - time interval unitid
- - id of this streamkey2
- - name of second streamid2
- - id of second streamkey3
- - name of third streamid3
- - id of third stream- Returns:
- stream data mapped by key and Stream ID
-
expire
public boolean expire(long timeToLive, TimeUnit timeUnit)
Description copied from interface:RExpirable
Set a timeout for object. After the timeout has expired, the key will automatically be deleted.- Specified by:
expire
in interfaceRExpirable
- Parameters:
timeToLive
- - timeout before object will be deletedtimeUnit
- - timeout time unit- Returns:
true
if the timeout was set andfalse
if not
-
expireAsync
public RFuture<Boolean> expireAsync(long timeToLive, TimeUnit timeUnit)
Description copied from interface:RExpirableAsync
Set a timeout for object in async mode. After the timeout has expired, the key will automatically be deleted.- Specified by:
expireAsync
in interfaceRExpirableAsync
- Parameters:
timeToLive
- - timeout before object will be deletedtimeUnit
- - timeout time unit- Returns:
true
if the timeout was set andfalse
if not
-
expireAt
public boolean expireAt(long timestamp)
Description copied from interface:RExpirable
Set an expire date for object. When expire date comes the key will automatically be deleted.- Specified by:
expireAt
in interfaceRExpirable
- Parameters:
timestamp
- - expire date in milliseconds (Unix timestamp)- Returns:
true
if the timeout was set andfalse
if not
-
expireAtAsync
public RFuture<Boolean> expireAtAsync(long timestamp)
Description copied from interface:RExpirableAsync
Set an expire date for object in async mode. When expire date comes the key will automatically be deleted.- Specified by:
expireAtAsync
in interfaceRExpirableAsync
- Parameters:
timestamp
- - expire date in milliseconds (Unix timestamp)- Returns:
true
if the timeout was set andfalse
if not
-
expireAt
public boolean expireAt(Date timestamp)
Description copied from interface:RExpirable
Set an expire date for object. When expire date comes the key will automatically be deleted.- Specified by:
expireAt
in interfaceRExpirable
- Parameters:
timestamp
- - expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireAtAsync
public RFuture<Boolean> expireAtAsync(Date timestamp)
Description copied from interface:RExpirableAsync
Set an expire date for object in async mode. When expire date comes the key will automatically be deleted.- Specified by:
expireAtAsync
in interfaceRExpirableAsync
- Parameters:
timestamp
- - expire date- Returns:
true
if the timeout was set andfalse
if not
-
clearExpire
public boolean clearExpire()
Description copied from interface:RExpirable
Clear an expire timeout or expire date for object.- Specified by:
clearExpire
in interfaceRExpirable
- Returns:
true
if timeout was removedfalse
if object does not exist or does not have an associated timeout
-
clearExpireAsync
public RFuture<Boolean> clearExpireAsync()
Description copied from interface:RExpirableAsync
Clear an expire timeout or expire date for object in async mode. Object will not be deleted.- Specified by:
clearExpireAsync
in interfaceRExpirableAsync
- Returns:
true
if the timeout was cleared andfalse
if not
-
remainTimeToLive
public long remainTimeToLive()
Description copied from interface:RExpirable
Remaining time to live of Redisson object that has a timeout- Specified by:
remainTimeToLive
in interfaceRExpirable
- Returns:
- time in milliseconds -2 if the key does not exist. -1 if the key exists but has no associated expire.
-
remainTimeToLiveAsync
public RFuture<Long> remainTimeToLiveAsync()
Description copied from interface:RExpirableAsync
Remaining time to live of Redisson object that has a timeout- Specified by:
remainTimeToLiveAsync
in interfaceRExpirableAsync
- Returns:
- time in milliseconds -2 if the key does not exist. -1 if the key exists but has no associated expire.
-
-