public class RedissonTimeSeries<V> extends RedissonObject implements RTimeSeries<V>
codec, commandExecutor, name| Constructor and Description |
|---|
RedissonTimeSeries(Codec codec,
EvictionScheduler evictionScheduler,
CommandAsyncExecutor connectionManager,
String name) |
RedissonTimeSeries(EvictionScheduler evictionScheduler,
CommandAsyncExecutor connectionManager,
String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(long timestamp,
V value)
Adds element to this time-series collection
by specified
timestamp. |
void |
add(long timestamp,
V value,
long timeToLive,
TimeUnit timeUnit)
Adds element to this time-series collection
by specified
timestamp. |
void |
addAll(Map<Long,V> objects)
Adds all elements contained in the specified map to this time-series collection.
|
void |
addAll(Map<Long,V> objects,
long timeToLive,
TimeUnit timeUnit)
Adds all elements contained in the specified map to this time-series collection.
|
RFuture<Void> |
addAllAsync(Map<Long,V> objects)
Adds all elements contained in the specified map to this time-series collection.
|
RFuture<Void> |
addAllAsync(Map<Long,V> objects,
long timeToLive,
TimeUnit timeUnit)
Adds all elements contained in the specified map to this time-series collection.
|
RFuture<Void> |
addAsync(long timestamp,
V object)
Adds element to this time-series collection
by specified
timestamp. |
RFuture<Void> |
addAsync(long timestamp,
V object,
long timeToLive,
TimeUnit timeUnit)
Adds element to this time-series collection
by specified
timestamp. |
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.
|
protected RFuture<Boolean> |
clearExpireAsync(String... keys) |
RFuture<Boolean> |
deleteAsync()
Delete object in async mode
|
void |
destroy()
Destroys object when it's not necessary anymore.
|
Collection<TimeSeriesEntry<V>> |
entryRange(long startTimestamp,
long endTimestamp)
Returns ordered entries of this time-series collection within timestamp range.
|
RFuture<Collection<TimeSeriesEntry<V>>> |
entryRangeAsync(boolean reverse,
long startTimestamp,
long endTimestamp) |
RFuture<Collection<TimeSeriesEntry<V>>> |
entryRangeAsync(long startTimestamp,
long endTimestamp)
Returns ordered entries of this time-series collection within timestamp range.
|
Collection<TimeSeriesEntry<V>> |
entryRangeReversed(long startTimestamp,
long endTimestamp)
Returns entries of this time-series collection in reverse order within timestamp range.
|
RFuture<Collection<TimeSeriesEntry<V>>> |
entryRangeReversedAsync(long startTimestamp,
long endTimestamp)
Returns entries of this time-series collection in reverse order within timestamp range.
|
boolean |
expire(Instant instant)
Set an expire date for object.
|
boolean |
expire(long timeToLive,
TimeUnit timeUnit)
Set a timeout for object.
|
RFuture<Boolean> |
expireAsync(Instant instant)
Set an expire date for object.
|
RFuture<Boolean> |
expireAsync(long timeToLive,
TimeUnit timeUnit)
Set a timeout for object in async mode.
|
protected RFuture<Boolean> |
expireAsync(long timeToLive,
TimeUnit timeUnit,
String... keys) |
boolean |
expireAt(Date timestamp)
Use
RExpirable.expire(Instant) instead |
boolean |
expireAt(long timestamp)
Use
RExpirable.expire(Instant) instead |
RFuture<Boolean> |
expireAtAsync(Date timestamp)
Use
RExpirableAsync.expireAsync(Instant) instead |
RFuture<Boolean> |
expireAtAsync(long timestamp)
Use
RExpirableAsync.expireAsync(Instant) instead |
protected RFuture<Boolean> |
expireAtAsync(long timestamp,
String... keys) |
V |
first()
Returns the head element or
null if this time-series collection is empty. |
Collection<V> |
first(int count)
Returns the head elements of this time-series collection.
|
RFuture<V> |
firstAsync()
Returns the head element or
null if this time-series collection is empty. |
RFuture<Collection<V>> |
firstAsync(int count)
Returns the head elements of this time-series collection.
|
Long |
firstTimestamp()
Returns timestamp of the head timestamp or
null if this time-series collection is empty. |
RFuture<Long> |
firstTimestampAsync()
Returns timestamp of the head timestamp or
null if this time-series collection is empty. |
V |
get(long timestamp)
Returns object by specified
timestamp or null if it doesn't exist. |
RFuture<V> |
getAsync(long timestamp)
Returns object by specified
timestamp or null if it doesn't exist. |
Iterator<V> |
iterator() |
Iterator<V> |
iterator(int count)
Returns an iterator over elements in this time-series collection.
|
V |
last()
Returns the tail element or
null if this time-series collection is empty. |
Collection<V> |
last(int count)
Returns the tail elements of this time-series collection.
|
RFuture<V> |
lastAsync()
Returns the tail element or
null if this time-series collection is empty. |
RFuture<Collection<V>> |
lastAsync(int count)
Returns the tail elements of this time-series collection.
|
Long |
lastTimestamp()
Returns timestamp of the tail element or
null if this time-series collection is empty. |
RFuture<Long> |
lastTimestampAsync()
Returns timestamp of the tail element or
null if this time-series collection is empty. |
V |
pollFirst()
Removes and returns the head element or
null if this time-series collection is empty. |
Collection<V> |
pollFirst(int count)
Removes and returns the head elements or
null if this time-series collection is empty. |
RFuture<V> |
pollFirstAsync()
Removes and returns the head element or
null if this time-series collection is empty. |
RFuture<Collection<V>> |
pollFirstAsync(int count)
Removes and returns the head elements or
null if this time-series collection is empty. |
V |
pollLast()
Removes and returns the tail element or
null if this time-series collection is empty. |
Collection<V> |
pollLast(int count)
Removes and returns the tail elements or
null if this time-series collection is empty. |
RFuture<V> |
pollLastAsync()
Removes and returns the tail element or
null if this time-series collection is empty. |
RFuture<Collection<V>> |
pollLastAsync(int count)
Removes and returns the tail elements or
null if this time-series collection is empty. |
Collection<V> |
range(long startTimestamp,
long endTimestamp)
Returns ordered elements of this time-series collection within timestamp range.
|
RFuture<Collection<V>> |
rangeAsync(long startTimestamp,
long endTimestamp)
Returns ordered elements of this time-series collection within timestamp range.
|
Collection<V> |
rangeReversed(long startTimestamp,
long endTimestamp)
Returns elements of this time-series collection in reverse order within timestamp range.
|
RFuture<Collection<V>> |
rangeReversedAsync(long startTimestamp,
long endTimestamp)
Returns elements of this time-series collection in reverse order within timestamp range.
|
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
|
boolean |
remove(long timestamp)
Removes object by specified
timestamp. |
RFuture<Boolean> |
removeAsync(long timestamp)
Removes object by specified
timestamp. |
int |
removeRange(long startTimestamp,
long endTimestamp)
Removes values within timestamp range.
|
RFuture<Integer> |
removeRangeAsync(long startTimestamp,
long endTimestamp)
Removes values within timestamp range.
|
ListScanResult<Object> |
scanIterator(String name,
RedisClient client,
long startPos,
int count) |
RFuture<ListScanResult<Object>> |
scanIteratorAsync(String name,
RedisClient client,
long startPos,
int count) |
int |
size()
Returns size of this set.
|
RFuture<Integer> |
sizeAsync()
Returns size of this set.
|
RFuture<Long> |
sizeInMemoryAsync()
Returns bytes amount used by object in Redis memory.
|
Stream<V> |
stream()
Returns stream of elements in this time-series collection.
|
Stream<V> |
stream(int count)
Returns stream of elements in this time-series collection.
|
addListener, addListener, addListenerAsync, addListenerAsync, copy, copyAsync, delete, deleteAsync, dump, dumpAsync, encode, encode, encode, encode, encodeMapKey, encodeMapKeys, encodeMapValue, encodeMapValues, get, getCodec, getIdleTime, getIdleTimeAsync, getLockByMapKey, getLockByValue, getName, getRawName, getRawName, isExists, isExistsAsync, migrate, migrateAsync, move, moveAsync, prefixName, removeListener, removeListenerAsync, removeListenersAsync, rename, renameAsync, renamenx, renamenxAsync, restore, restore, restoreAndReplace, restoreAndReplace, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, setName, sizeInMemory, sizeInMemoryAsync, sizeInMemoryAsync, suffixName, toSeconds, toStream, touch, touchAsync, unlink, unlinkAsyncclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclearExpire, expire, expire, expireAt, expireAt, remainTimeToLiveaddListener, copy, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlinkforEach, spliteratorexpireAsync, expireAtAsync, remainTimeToLiveAsyncaddListenerAsync, copyAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, touchAsync, unlinkAsyncpublic RedissonTimeSeries(EvictionScheduler evictionScheduler, CommandAsyncExecutor connectionManager, String name)
public RedissonTimeSeries(Codec codec, EvictionScheduler evictionScheduler, CommandAsyncExecutor connectionManager, String name)
public void add(long timestamp,
V value)
RTimeSeriestimestamp.add in interface RTimeSeries<V>timestamp - - object timestampvalue - - object itselfpublic RFuture<Void> addAsync(long timestamp, V object)
RTimeSeriesAsynctimestamp.addAsync in interface RTimeSeriesAsync<V>timestamp - - object timestampobject - - object itselfpublic void addAll(Map<Long,V> objects)
RTimeSeriesaddAll in interface RTimeSeries<V>objects - - map of elements to addpublic void add(long timestamp,
V value,
long timeToLive,
TimeUnit timeUnit)
RTimeSeriestimestamp.add in interface RTimeSeries<V>timestamp - - object timestampvalue - - object itselftimeToLive - - time to live intervaltimeUnit - - unit of time to live intervalpublic RFuture<Void> addAsync(long timestamp, V object, long timeToLive, TimeUnit timeUnit)
RTimeSeriesAsynctimestamp.addAsync in interface RTimeSeriesAsync<V>timestamp - - object timestampobject - - object itselftimeToLive - - time to live intervaltimeUnit - - unit of time to live intervalpublic void addAll(Map<Long,V> objects, long timeToLive, TimeUnit timeUnit)
RTimeSeriesaddAll in interface RTimeSeries<V>objects - - map of elements to addtimeToLive - - time to live intervaltimeUnit - - unit of time to live intervalpublic RFuture<Void> addAllAsync(Map<Long,V> objects)
RTimeSeriesAsyncaddAllAsync in interface RTimeSeriesAsync<V>objects - - map of elements to addpublic RFuture<Void> addAllAsync(Map<Long,V> objects, long timeToLive, TimeUnit timeUnit)
RTimeSeriesAsyncaddAllAsync in interface RTimeSeriesAsync<V>objects - - map of elements to addtimeToLive - - time to live intervaltimeUnit - - unit of time to live intervalpublic int size()
RTimeSeriessize in interface RTimeSeries<V>public RFuture<Integer> sizeAsync()
RTimeSeriesAsyncsizeAsync in interface RTimeSeriesAsync<V>public V get(long timestamp)
RTimeSeriestimestamp or null if it doesn't exist.get in interface RTimeSeries<V>timestamp - - object timestamppublic RFuture<V> getAsync(long timestamp)
RTimeSeriesAsynctimestamp or null if it doesn't exist.getAsync in interface RTimeSeriesAsync<V>timestamp - - object timestamppublic boolean remove(long timestamp)
RTimeSeriestimestamp.remove in interface RTimeSeries<V>timestamp - - object timestamptrue if an element was removed as a result of this callpublic RFuture<Boolean> removeAsync(long timestamp)
RTimeSeriesAsynctimestamp.removeAsync in interface RTimeSeriesAsync<V>timestamp - - object timestamptrue if an element was removed as a result of this callpublic V last()
RTimeSeriesnull if this time-series collection is empty.last in interface RTimeSeries<V>null if this time-series collection is emptypublic RFuture<V> lastAsync()
RTimeSeriesAsyncnull if this time-series collection is empty.lastAsync in interface RTimeSeriesAsync<V>null if this time-series collection is emptypublic RFuture<Collection<V>> lastAsync(int count)
RTimeSeriesAsynclastAsync in interface RTimeSeriesAsync<V>count - - elements amountpublic V first()
RTimeSeriesnull if this time-series collection is empty.first in interface RTimeSeries<V>null if this time-series collection is emptypublic RFuture<V> firstAsync()
RTimeSeriesAsyncnull if this time-series collection is empty.firstAsync in interface RTimeSeriesAsync<V>null if this time-series collection is emptypublic RFuture<Collection<V>> firstAsync(int count)
RTimeSeriesAsyncfirstAsync in interface RTimeSeriesAsync<V>count - - elements amountpublic Collection<V> first(int count)
RTimeSeriesfirst in interface RTimeSeries<V>count - - elements amountpublic Collection<V> last(int count)
RTimeSerieslast in interface RTimeSeries<V>count - - elements amountpublic Long firstTimestamp()
RTimeSeriesnull if this time-series collection is empty.firstTimestamp in interface RTimeSeries<V>null if this time-series collection is emptypublic RFuture<Long> firstTimestampAsync()
RTimeSeriesAsyncnull if this time-series collection is empty.firstTimestampAsync in interface RTimeSeriesAsync<V>null if this time-series collection is emptypublic Long lastTimestamp()
RTimeSeriesnull if this time-series collection is empty.lastTimestamp in interface RTimeSeries<V>null if this time-series collection is emptypublic RFuture<Long> lastTimestampAsync()
RTimeSeriesAsyncnull if this time-series collection is empty.lastTimestampAsync in interface RTimeSeriesAsync<V>null if this time-series collection is emptypublic int removeRange(long startTimestamp,
long endTimestamp)
RTimeSeriesremoveRange in interface RTimeSeries<V>startTimestamp - - start timestampendTimestamp - - end timestamppublic RFuture<Integer> removeRangeAsync(long startTimestamp, long endTimestamp)
RTimeSeriesAsyncremoveRangeAsync in interface RTimeSeriesAsync<V>startTimestamp - - start timestampendTimestamp - - end timestamppublic Collection<V> range(long startTimestamp, long endTimestamp)
RTimeSeriesrange in interface RTimeSeries<V>startTimestamp - - start timestampendTimestamp - - end timestamppublic Collection<TimeSeriesEntry<V>> entryRange(long startTimestamp, long endTimestamp)
RTimeSeriesentryRange in interface RTimeSeries<V>startTimestamp - - start timestampendTimestamp - - end timestamppublic Collection<TimeSeriesEntry<V>> entryRangeReversed(long startTimestamp, long endTimestamp)
RTimeSeriesentryRangeReversed in interface RTimeSeries<V>startTimestamp - - start timestampendTimestamp - - end timestamppublic RFuture<Collection<TimeSeriesEntry<V>>> entryRangeReversedAsync(long startTimestamp, long endTimestamp)
RTimeSeriesAsyncentryRangeReversedAsync in interface RTimeSeriesAsync<V>startTimestamp - - start timestampendTimestamp - - end timestamppublic RFuture<Collection<TimeSeriesEntry<V>>> entryRangeAsync(long startTimestamp, long endTimestamp)
RTimeSeriesAsyncentryRangeAsync in interface RTimeSeriesAsync<V>startTimestamp - - start timestampendTimestamp - - end timestamppublic RFuture<Collection<TimeSeriesEntry<V>>> entryRangeAsync(boolean reverse, long startTimestamp, long endTimestamp)
public RFuture<Collection<V>> rangeAsync(long startTimestamp, long endTimestamp)
RTimeSeriesAsyncrangeAsync in interface RTimeSeriesAsync<V>startTimestamp - - start timestampendTimestamp - - end timestamppublic Collection<V> rangeReversed(long startTimestamp, long endTimestamp)
RTimeSeriesrangeReversed in interface RTimeSeries<V>startTimestamp - - start timestampendTimestamp - - end timestamppublic RFuture<Collection<V>> rangeReversedAsync(long startTimestamp, long endTimestamp)
RTimeSeriesAsyncrangeReversedAsync in interface RTimeSeriesAsync<V>startTimestamp - - start timestampendTimestamp - - end timestamppublic Collection<V> pollFirst(int count)
RTimeSeriesnull if this time-series collection is empty.pollFirst in interface RTimeSeries<V>count - - elements amountnull if this time-series collection is emptypublic Collection<V> pollLast(int count)
RTimeSeriesnull if this time-series collection is empty.pollLast in interface RTimeSeries<V>count - - elements amountnull if this time-series collection is emptypublic RFuture<Collection<V>> pollFirstAsync(int count)
RTimeSeriesAsyncnull if this time-series collection is empty.pollFirstAsync in interface RTimeSeriesAsync<V>count - - elements amountnull if this time-series collection is emptypublic RFuture<Collection<V>> pollLastAsync(int count)
RTimeSeriesAsyncnull if this time-series collection is empty.pollLastAsync in interface RTimeSeriesAsync<V>count - - elements amountnull if this time-series collection is emptypublic V pollFirst()
RTimeSeriesnull if this time-series collection is empty.pollFirst in interface RTimeSeries<V>null if this time-series collection is emptypublic V pollLast()
RTimeSeriesnull if this time-series collection is empty.pollLast in interface RTimeSeries<V>null if this time-series collection is emptypublic RFuture<V> pollFirstAsync()
RTimeSeriesAsyncnull if this time-series collection is empty.pollFirstAsync in interface RTimeSeriesAsync<V>null if this time-series collection is emptypublic RFuture<V> pollLastAsync()
RTimeSeriesAsyncnull if this time-series collection is empty.pollLastAsync in interface RTimeSeriesAsync<V>null if this time-series collection is emptypublic ListScanResult<Object> scanIterator(String name, RedisClient client, long startPos, int count)
public RFuture<ListScanResult<Object>> scanIteratorAsync(String name, RedisClient client, long startPos, int count)
public Iterator<V> iterator(int count)
RTimeSeriescount param.iterator in interface RTimeSeries<V>count - - size of elements batchpublic Stream<V> stream()
RTimeSeriesstream in interface RTimeSeries<V>public Stream<V> stream(int count)
RTimeSeriescount param.stream in interface RTimeSeries<V>count - - size of elements batchpublic void destroy()
RDestroyabledestroy in interface RDestroyablepublic RFuture<Boolean> deleteAsync()
RObjectAsyncdeleteAsync in interface RObjectAsyncdeleteAsync in class RedissonObjecttrue if object was deleted false if notpublic RFuture<Boolean> expireAsync(long timeToLive, TimeUnit timeUnit)
RExpirableAsyncexpireAsync in interface RExpirableAsynctimeToLive - - timeout before object will be deletedtimeUnit - - timeout time unittrue if the timeout was set and false if notpublic RFuture<Boolean> expireAtAsync(long timestamp)
RExpirableAsyncRExpirableAsync.expireAsync(Instant) insteadexpireAtAsync in interface RExpirableAsynctimestamp - - expire date in milliseconds (Unix timestamp)true if the timeout was set and false if notpublic RFuture<Boolean> clearExpireAsync()
RExpirableAsyncclearExpireAsync in interface RExpirableAsynctrue if the timeout was cleared and false if notpublic RFuture<Long> sizeInMemoryAsync()
RObjectAsyncsizeInMemoryAsync in interface RObjectAsyncsizeInMemoryAsync in class RedissonObjectpublic boolean expire(long timeToLive,
TimeUnit timeUnit)
RExpirableexpire in interface RExpirabletimeToLive - - timeout before object will be deletedtimeUnit - - timeout time unittrue if the timeout was set and false if notpublic boolean expireAt(long timestamp)
RExpirableRExpirable.expire(Instant) insteadexpireAt in interface RExpirabletimestamp - - expire date in milliseconds (Unix timestamp)true if the timeout was set and false if notpublic boolean expire(Instant instant)
RExpirableexpire in interface RExpirableinstant - - expire datetrue if the timeout was set and false if notpublic RFuture<Boolean> expireAsync(Instant instant)
RExpirableAsyncexpireAsync in interface RExpirableAsyncinstant - - expire datetrue if the timeout was set and false if notpublic boolean expireAt(Date timestamp)
RExpirableRExpirable.expire(Instant) insteadexpireAt in interface RExpirabletimestamp - - expire datetrue if the timeout was set and false if notpublic RFuture<Boolean> expireAtAsync(Date timestamp)
RExpirableAsyncRExpirableAsync.expireAsync(Instant) insteadexpireAtAsync in interface RExpirableAsynctimestamp - - expire datetrue if the timeout was set and false if notpublic boolean clearExpire()
RExpirableclearExpire in interface RExpirabletrue if timeout was removed
false if object does not exist or does not have an associated timeoutpublic long remainTimeToLive()
RExpirableremainTimeToLive in interface RExpirablepublic RFuture<Long> remainTimeToLiveAsync()
RExpirableAsyncremainTimeToLiveAsync in interface RExpirableAsyncprotected RFuture<Boolean> expireAsync(long timeToLive, TimeUnit timeUnit, String... keys)
Copyright © 2014–2021 Redisson. All rights reserved.