K
- key typeV
- value typeRExpirable
, RExpirableAsync
, RObject
, RObjectAsync
, RStream<K,V>
, RStreamAsync<K,V>
public class RedissonStream<K,V> extends RedissonObject implements RStream<K,V>
codec, commandExecutor
Constructor | Description |
---|---|
RedissonStream(Codec codec,
CommandAsyncExecutor connectionManager,
String name) |
|
RedissonStream(CommandAsyncExecutor connectionManager,
String name) |
Modifier and Type | Method | Description |
---|---|---|
StreamId |
add(K key,
V value) |
Appends a new entry and returns generated Stream ID
|
StreamId |
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 ID
|
void |
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 ID
|
StreamId |
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 ID
|
void |
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 ID
|
RFuture<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 ID
|
RFuture<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 ID
|
RFuture<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 ID
|
RFuture<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) |
|
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.
|
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.
|
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.
|
long |
remainTimeToLive() |
Remaining time to live of Redisson object that has a timeout
|
RFuture<Long> |
remainTimeToLiveAsync() |
Remaining time to live of Redisson object that has a timeout
|
long |
size() |
Returns number of entries in stream
|
RFuture<Long> |
sizeAsync() |
Returns number of entries in stream
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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
clearExpire, expire, expireAt, expireAt, remainTimeToLive
clearExpireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsync
copy, delete, dump, getCodec, getName, isExists, migrate, move, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, touch, unlink
copyAsync, deleteAsync, dumpAsync, isExistsAsync, migrateAsync, moveAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, touchAsync, unlinkAsync
public RedissonStream(Codec codec, CommandAsyncExecutor connectionManager, String name)
public RedissonStream(CommandAsyncExecutor connectionManager, String name)
protected void checkKey(Object key)
protected void checkValue(Object value)
public StreamId addAll(Map<K,V> entries)
RStream
public RFuture<StreamId> addAllAsync(Map<K,V> entries)
RStreamAsync
addAllAsync
in interface RStreamAsync<K,V>
entries
- - entries to addpublic void addAll(StreamId id, Map<K,V> entries)
RStream
public RFuture<Void> addAllAsync(StreamId id, Map<K,V> entries)
RStreamAsync
addAllAsync
in interface RStreamAsync<K,V>
id
- - Stream IDentries
- - entries to addpublic StreamId addAll(Map<K,V> entries, int trimLen, boolean trimStrict)
RStream
trimLen
size.
If trimStrict
is false
then trims to few tens of entries more than specified length to trim.public RFuture<StreamId> addAllAsync(Map<K,V> entries, int trimLen, boolean trimStrict)
RStreamAsync
trimLen
size.
If trimStrict
is false
then trims to few tens of entries more than specified length to trim.addAllAsync
in interface RStreamAsync<K,V>
entries
- - entries to addtrimLen
- - length to trimtrimStrict
- - if false
then trims to few tens of entries more than specified length to trimpublic void addAll(StreamId id, Map<K,V> entries, int trimLen, boolean trimStrict)
RStream
trimLen
size.
If trimStrict
is false
then trims to few tens of entries more than specified length to trim.public RFuture<Void> addAllAsync(StreamId id, Map<K,V> entries, int trimLen, boolean trimStrict)
RStreamAsync
trimLen
size.
If trimStrict
is false
then trims to few tens of entries more than specified length to trim.addAllAsync
in interface RStreamAsync<K,V>
id
- - Stream IDentries
- - entries to addtrimLen
- - length to trimtrimStrict
- - if false
then trims to few tens of entries more than specified length to trimpublic long size()
RStream
public RFuture<Long> sizeAsync()
RStreamAsync
sizeAsync
in interface RStreamAsync<K,V>
public Map<StreamId,Map<K,V>> read(int count, StreamId... ids)
RStream
public RFuture<Map<String,Map<StreamId,Map<K,V>>>> readAsync(int count, StreamId id, Map<String,StreamId> keyToId)
RStreamAsync
readAsync
in interface RStreamAsync<K,V>
count
- - stream data size limitid
- - id of this streamkeyToId
- - stream id mapped by namepublic Map<StreamId,Map<K,V>> read(int count, long timeout, TimeUnit unit, StreamId... ids)
RStream
timeout
interval.public RFuture<Map<String,Map<StreamId,Map<K,V>>>> readAsync(int count, long timeout, TimeUnit unit, StreamId id, Map<String,StreamId> keyToId)
RStreamAsync
timeout
interval.readAsync
in interface RStreamAsync<K,V>
count
- - stream data size limittimeout
- - time interval to wait for stream data availabilityunit
- - time interval unitid
- - id of this streamkeyToId
- - stream id mapped by namepublic RFuture<StreamId> addAsync(K key, V value)
RStreamAsync
addAsync
in interface RStreamAsync<K,V>
key
- - key of entryvalue
- - value of entrypublic RFuture<Void> addAsync(StreamId id, K key, V value)
RStreamAsync
addAsync
in interface RStreamAsync<K,V>
id
- - Stream IDkey
- - key of entryvalue
- - value of entrypublic RFuture<StreamId> addAsync(K key, V value, int trimLen, boolean trimStrict)
RStreamAsync
trimLen
size.
If trimStrict
is false
then trims to few tens of entries more than specified length to trim.addAsync
in interface RStreamAsync<K,V>
key
- - key of entryvalue
- - value of entrytrimLen
- - length to trimtrimStrict
- - if false
then trims to few tens of entries more than specified length to trimpublic RFuture<Void> addAsync(StreamId id, K key, V value, int trimLen, boolean trimStrict)
RStreamAsync
trimLen
size.
If trimStrict
is false
then trims to few tens of entries more than specified length to trim.addAsync
in interface RStreamAsync<K,V>
id
- - Stream IDkey
- - key of entryvalue
- - value of entrytrimLen
- - length to trimtrimStrict
- - if false
then trims to few tens of entries more than specified length to trimpublic StreamId add(K key, V value)
RStream
public void add(StreamId id, K key, V value)
RStream
public StreamId add(K key, V value, int trimLen, boolean trimStrict)
RStream
trimLen
size.
If trimStrict
is false
then trims to few tens of entries more than specified length to trim.public void add(StreamId id, K key, V value, int trimLen, boolean trimStrict)
RStream
trimLen
size.
If trimStrict
is false
then trims to few tens of entries more than specified length to trim.public RFuture<Map<StreamId,Map<K,V>>> readAsync(int count, StreamId... ids)
RStreamAsync
readAsync
in interface RStreamAsync<K,V>
count
- - stream data size limitids
- - collection of Stream IDspublic RFuture<Map<StreamId,Map<K,V>>> readAsync(int count, long timeout, TimeUnit unit, StreamId... ids)
RStreamAsync
timeout
interval.readAsync
in interface RStreamAsync<K,V>
count
- - stream data size limittimeout
- - time interval to wait for stream data availabilityunit
- - time interval unitids
- - collection of Stream IDspublic Map<String,Map<StreamId,Map<K,V>>> read(int count, StreamId id, Map<String,StreamId> keyToId)
RStream
public Map<String,Map<StreamId,Map<K,V>>> read(int count, long timeout, TimeUnit unit, StreamId id, Map<String,StreamId> keyToId)
RStream
timeout
interval.public RFuture<Map<StreamId,Map<K,V>>> rangeAsync(int count, StreamId startId, StreamId endId)
RStreamAsync
rangeAsync
in interface RStreamAsync<K,V>
count
- - stream data size limitstartId
- - start Stream IDendId
- - end Stream IDpublic Map<StreamId,Map<K,V>> range(int count, StreamId startId, StreamId endId)
RStream
public RFuture<Map<StreamId,Map<K,V>>> rangeReversedAsync(int count, StreamId startId, StreamId endId)
RStreamAsync
rangeReversedAsync
in interface RStreamAsync<K,V>
count
- - stream data size limitstartId
- - start Stream IDendId
- - end Stream IDpublic Map<StreamId,Map<K,V>> rangeReversed(int count, StreamId startId, StreamId endId)
RStream
rangeReversed
in interface RStream<K,V>
count
- - stream data size limitstartId
- - start Stream IDendId
- - end Stream IDpublic RFuture<Map<StreamId,Map<K,V>>> readAsync(StreamId... ids)
RStreamAsync
readAsync
in interface RStreamAsync<K,V>
ids
- - collection of Stream IDspublic RFuture<Map<StreamId,Map<K,V>>> readAsync(long timeout, TimeUnit unit, StreamId... ids)
RStreamAsync
timeout
interval.readAsync
in interface RStreamAsync<K,V>
timeout
- - time interval to wait for stream data availabilityunit
- - time interval unitids
- - collection of Stream IDspublic RFuture<Map<String,Map<StreamId,Map<K,V>>>> readAsync(StreamId id, Map<String,StreamId> keyToId)
RStreamAsync
readAsync
in interface RStreamAsync<K,V>
id
- - id of this streamkeyToId
- - stream id mapped by namepublic RFuture<Map<String,Map<StreamId,Map<K,V>>>> readAsync(long timeout, TimeUnit unit, StreamId id, Map<String,StreamId> keyToId)
RStreamAsync
timeout
interval.readAsync
in interface RStreamAsync<K,V>
timeout
- - time interval to wait for stream data availabilityunit
- - time interval unitid
- - id of this streamkeyToId
- - stream id mapped by namepublic RFuture<Map<StreamId,Map<K,V>>> rangeAsync(StreamId startId, StreamId endId)
RStreamAsync
rangeAsync
in interface RStreamAsync<K,V>
startId
- - start Stream IDendId
- - end Stream IDpublic RFuture<Map<StreamId,Map<K,V>>> rangeReversedAsync(StreamId startId, StreamId endId)
RStreamAsync
rangeReversedAsync
in interface RStreamAsync<K,V>
startId
- - start Stream IDendId
- - end Stream IDpublic Map<StreamId,Map<K,V>> read(StreamId... ids)
RStream
public Map<StreamId,Map<K,V>> read(long timeout, TimeUnit unit, StreamId... ids)
RStream
timeout
interval.public Map<String,Map<StreamId,Map<K,V>>> read(StreamId id, Map<String,StreamId> keyToId)
RStream
public Map<String,Map<StreamId,Map<K,V>>> read(long timeout, TimeUnit unit, StreamId id, Map<String,StreamId> keyToId)
RStream
timeout
interval.public Map<StreamId,Map<K,V>> range(StreamId startId, StreamId endId)
RStream
public Map<StreamId,Map<K,V>> rangeReversed(StreamId startId, StreamId endId)
RStream
rangeReversed
in interface RStream<K,V>
startId
- - start Stream IDendId
- - end Stream IDpublic RFuture<Map<String,Map<StreamId,Map<K,V>>>> readAsync(StreamId id, String key2, StreamId id2)
RStreamAsync
readAsync
in interface RStreamAsync<K,V>
id
- - id of this streamkey2
- - name of second streamid2
- - id of second streampublic RFuture<Map<String,Map<StreamId,Map<K,V>>>> readAsync(StreamId id, String key2, StreamId id2, String key3, StreamId id3)
RStreamAsync
readAsync
in interface RStreamAsync<K,V>
id
- - id of this streamkey2
- - name of second streamid2
- - id of second streamkey3
- - name of third streamid3
- - id of third streampublic RFuture<Map<String,Map<StreamId,Map<K,V>>>> readAsync(int count, StreamId id, String key2, StreamId id2)
RStreamAsync
readAsync
in interface RStreamAsync<K,V>
count
- - stream data size limitid
- - id of this streamkey2
- - name of second streamid2
- - id of second streampublic RFuture<Map<String,Map<StreamId,Map<K,V>>>> readAsync(int count, StreamId id, String key2, StreamId id2, String key3, StreamId id3)
RStreamAsync
readAsync
in interface RStreamAsync<K,V>
count
- - stream data size limitid
- - id of this streamkey2
- - name of second streamid2
- - id of second streamkey3
- - name of third streamid3
- - id of third streampublic RFuture<Map<String,Map<StreamId,Map<K,V>>>> readAsync(long timeout, TimeUnit unit, StreamId id, String key2, StreamId id2)
RStreamAsync
timeout
interval.readAsync
in interface RStreamAsync<K,V>
timeout
- - time interval to wait for stream data availabilityunit
- - time interval unitid
- - id of this streamkey2
- - name of second streamid2
- - id of second streampublic RFuture<Map<String,Map<StreamId,Map<K,V>>>> readAsync(long timeout, TimeUnit unit, StreamId id, String key2, StreamId id2, String key3, StreamId id3)
RStreamAsync
timeout
interval.readAsync
in interface RStreamAsync<K,V>
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 streampublic RFuture<Map<String,Map<StreamId,Map<K,V>>>> readAsync(int count, long timeout, TimeUnit unit, StreamId id, String key2, StreamId id2)
RStreamAsync
timeout
interval.readAsync
in interface RStreamAsync<K,V>
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 streampublic 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)
RStreamAsync
timeout
interval.readAsync
in interface RStreamAsync<K,V>
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 streampublic Map<String,Map<StreamId,Map<K,V>>> read(StreamId id, String key2, StreamId id2)
RStream
public Map<String,Map<StreamId,Map<K,V>>> read(StreamId id, String key2, StreamId id2, String key3, StreamId id3)
RStream
public Map<String,Map<StreamId,Map<K,V>>> read(int count, StreamId id, String key2, StreamId id2)
RStream
public Map<String,Map<StreamId,Map<K,V>>> read(int count, StreamId id, String key2, StreamId id2, String key3, StreamId id3)
RStream
public Map<String,Map<StreamId,Map<K,V>>> read(long timeout, TimeUnit unit, StreamId id, String key2, StreamId id2)
RStream
timeout
interval.public Map<String,Map<StreamId,Map<K,V>>> read(long timeout, TimeUnit unit, StreamId id, String key2, StreamId id2, String key3, StreamId id3)
RStream
timeout
interval.read
in interface RStream<K,V>
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 streampublic Map<String,Map<StreamId,Map<K,V>>> read(int count, long timeout, TimeUnit unit, StreamId id, String key2, StreamId id2)
RStream
timeout
interval.read
in interface RStream<K,V>
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 streampublic Map<String,Map<StreamId,Map<K,V>>> read(int count, long timeout, TimeUnit unit, StreamId id, String key2, StreamId id2, String key3, StreamId id3)
RStream
timeout
interval.read
in interface RStream<K,V>
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 streampublic boolean expire(long timeToLive, TimeUnit timeUnit)
RExpirable
expire
in interface RExpirable
timeToLive
- - timeout before object will be deletedtimeUnit
- - timeout time unittrue
if the timeout was set and false
if notpublic RFuture<Boolean> expireAsync(long timeToLive, TimeUnit timeUnit)
RExpirableAsync
expireAsync
in interface RExpirableAsync
timeToLive
- - timeout before object will be deletedtimeUnit
- - timeout time unittrue
if the timeout was set and false
if notpublic boolean expireAt(long timestamp)
RExpirable
expireAt
in interface RExpirable
timestamp
- - expire date in milliseconds (Unix timestamp)true
if the timeout was set and false
if notpublic RFuture<Boolean> expireAtAsync(long timestamp)
RExpirableAsync
expireAtAsync
in interface RExpirableAsync
timestamp
- - expire date in seconds (Unix timestamp)true
if the timeout was set and false
if notpublic boolean expireAt(Date timestamp)
RExpirable
expireAt
in interface RExpirable
timestamp
- - expire datetrue
if the timeout was set and false
if notpublic RFuture<Boolean> expireAtAsync(Date timestamp)
RExpirableAsync
expireAtAsync
in interface RExpirableAsync
timestamp
- - expire datetrue
if the timeout was set and false
if notpublic boolean clearExpire()
RExpirable
clearExpire
in interface RExpirable
true
if timeout was removed
false
if object does not exist or does not have an associated timeoutpublic RFuture<Boolean> clearExpireAsync()
RExpirableAsync
clearExpireAsync
in interface RExpirableAsync
true
if the timeout was cleared and false
if notpublic long remainTimeToLive()
RExpirable
remainTimeToLive
in interface RExpirable
public RFuture<Long> remainTimeToLiveAsync()
RExpirableAsync
remainTimeToLiveAsync
in interface RExpirableAsync
Copyright © 2014–2018 The Redisson Project. All rights reserved.