Package org.redisson
Class RedissonTimeSeries<V>
- java.lang.Object
-
- org.redisson.RedissonObject
-
- org.redisson.RedissonTimeSeries<V>
-
- All Implemented Interfaces:
Iterable<V>,RDestroyable,RExpirable,RExpirableAsync,RObject,RObjectAsync,RTimeSeries<V>,RTimeSeriesAsync<V>
public class RedissonTimeSeries<V> extends RedissonObject implements RTimeSeries<V>
- Author:
- Nikita Koksharov
-
-
Field Summary
-
Fields inherited from class org.redisson.RedissonObject
codec, commandExecutor, name
-
-
Constructor Summary
Constructors Constructor Description RedissonTimeSeries(Codec codec, EvictionScheduler evictionScheduler, CommandAsyncExecutor connectionManager, String name)RedissonTimeSeries(EvictionScheduler evictionScheduler, CommandAsyncExecutor connectionManager, String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(long timestamp, V value)Adds element to this time-series collection by specifiedtimestamp.voidadd(long timestamp, V value, long timeToLive, TimeUnit timeUnit)Adds element to this time-series collection by specifiedtimestamp.voidaddAll(Map<Long,V> objects)Adds all elements contained in the specified map to this time-series collection.voidaddAll(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 specifiedtimestamp.RFuture<Void>addAsync(long timestamp, V object, long timeToLive, TimeUnit timeUnit)Adds element to this time-series collection by specifiedtimestamp.booleanclearExpire()Clear an expire timeout or expire date for object.RFuture<Boolean>clearExpireAsync()Clear an expire timeout or expire date for object in async mode.protected RFuture<Boolean>clearExpireAsync(String... keys)RFuture<Boolean>deleteAsync()Delete object in async modevoiddestroy()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.booleanexpire(long timeToLive, TimeUnit timeUnit)Set a timeout for object.booleanexpire(Instant instant)Set an expire date for object.RFuture<Boolean>expireAsync(long timeToLive, TimeUnit timeUnit)Set a timeout for object in async mode.protected RFuture<Boolean>expireAsync(long timeToLive, TimeUnit timeUnit, String... keys)RFuture<Boolean>expireAsync(Instant instant)Set an expire date for object.booleanexpireAt(long timestamp)UseRExpirable.expire(Instant)insteadbooleanexpireAt(Date timestamp)UseRExpirable.expire(Instant)insteadRFuture<Boolean>expireAtAsync(long timestamp)UseRExpirableAsync.expireAsync(Instant)insteadprotected RFuture<Boolean>expireAtAsync(long timestamp, String... keys)RFuture<Boolean>expireAtAsync(Date timestamp)UseRExpirableAsync.expireAsync(Instant)insteadVfirst()Returns the head element ornullif 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 ornullif this time-series collection is empty.RFuture<Collection<V>>firstAsync(int count)Returns the head elements of this time-series collection.LongfirstTimestamp()Returns timestamp of the head timestamp ornullif this time-series collection is empty.RFuture<Long>firstTimestampAsync()Returns timestamp of the head timestamp ornullif this time-series collection is empty.Vget(long timestamp)Returns object by specifiedtimestampornullif it doesn't exist.RFuture<V>getAsync(long timestamp)Returns object by specifiedtimestampornullif it doesn't exist.Iterator<V>iterator()Iterator<V>iterator(int count)Returns an iterator over elements in this time-series collection.Vlast()Returns the tail element ornullif 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 ornullif this time-series collection is empty.RFuture<Collection<V>>lastAsync(int count)Returns the tail elements of this time-series collection.LonglastTimestamp()Returns timestamp of the tail element ornullif this time-series collection is empty.RFuture<Long>lastTimestampAsync()Returns timestamp of the tail element ornullif this time-series collection is empty.VpollFirst()Removes and returns the head element ornullif this time-series collection is empty.Collection<V>pollFirst(int count)Removes and returns the head elements ornullif this time-series collection is empty.RFuture<V>pollFirstAsync()Removes and returns the head element ornullif this time-series collection is empty.RFuture<Collection<V>>pollFirstAsync(int count)Removes and returns the head elements ornullif this time-series collection is empty.VpollLast()Removes and returns the tail element ornullif this time-series collection is empty.Collection<V>pollLast(int count)Removes and returns the tail elements ornullif this time-series collection is empty.RFuture<V>pollLastAsync()Removes and returns the tail element ornullif this time-series collection is empty.RFuture<Collection<V>>pollLastAsync(int count)Removes and returns the tail elements ornullif 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.longremainTimeToLive()Remaining time to live of Redisson object that has a timeoutRFuture<Long>remainTimeToLiveAsync()Remaining time to live of Redisson object that has a timeoutbooleanremove(long timestamp)Removes object by specifiedtimestamp.RFuture<Boolean>removeAsync(long timestamp)Removes object by specifiedtimestamp.intremoveRange(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)intsize()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.-
Methods inherited from class org.redisson.RedissonObject
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, unlinkAsync
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface org.redisson.api.RExpirable
clearExpire, expire, expire, expireAt, expireAt, remainTimeToLive
-
Methods inherited from interface org.redisson.api.RExpirableAsync
expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsync
-
Methods inherited from interface org.redisson.api.RObject
addListener, copy, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlink
-
Methods inherited from interface org.redisson.api.RObjectAsync
addListenerAsync, copyAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, touchAsync, unlinkAsync
-
-
-
-
Constructor Detail
-
RedissonTimeSeries
public RedissonTimeSeries(EvictionScheduler evictionScheduler, CommandAsyncExecutor connectionManager, String name)
-
RedissonTimeSeries
public RedissonTimeSeries(Codec codec, EvictionScheduler evictionScheduler, CommandAsyncExecutor connectionManager, String name)
-
-
Method Detail
-
add
public void add(long timestamp, V value)Description copied from interface:RTimeSeriesAdds element to this time-series collection by specifiedtimestamp.- Specified by:
addin interfaceRTimeSeries<V>- Parameters:
timestamp- - object timestampvalue- - object itself
-
addAsync
public RFuture<Void> addAsync(long timestamp, V object)
Description copied from interface:RTimeSeriesAsyncAdds element to this time-series collection by specifiedtimestamp.- Specified by:
addAsyncin interfaceRTimeSeriesAsync<V>- Parameters:
timestamp- - object timestampobject- - object itself- Returns:
- void
-
addAll
public void addAll(Map<Long,V> objects)
Description copied from interface:RTimeSeriesAdds all elements contained in the specified map to this time-series collection. Map contains of timestamp mapped by object.- Specified by:
addAllin interfaceRTimeSeries<V>- Parameters:
objects- - map of elements to add
-
add
public void add(long timestamp, V value, long timeToLive, TimeUnit timeUnit)Description copied from interface:RTimeSeriesAdds element to this time-series collection by specifiedtimestamp.- Specified by:
addin interfaceRTimeSeries<V>- Parameters:
timestamp- - object timestampvalue- - object itselftimeToLive- - time to live intervaltimeUnit- - unit of time to live interval
-
addAsync
public RFuture<Void> addAsync(long timestamp, V object, long timeToLive, TimeUnit timeUnit)
Description copied from interface:RTimeSeriesAsyncAdds element to this time-series collection by specifiedtimestamp.- Specified by:
addAsyncin interfaceRTimeSeriesAsync<V>- Parameters:
timestamp- - object timestampobject- - object itselftimeToLive- - time to live intervaltimeUnit- - unit of time to live interval- Returns:
- void
-
addAll
public void addAll(Map<Long,V> objects, long timeToLive, TimeUnit timeUnit)
Description copied from interface:RTimeSeriesAdds all elements contained in the specified map to this time-series collection. Map contains of timestamp mapped by object.- Specified by:
addAllin interfaceRTimeSeries<V>- Parameters:
objects- - map of elements to addtimeToLive- - time to live intervaltimeUnit- - unit of time to live interval
-
addAllAsync
public RFuture<Void> addAllAsync(Map<Long,V> objects)
Description copied from interface:RTimeSeriesAsyncAdds all elements contained in the specified map to this time-series collection. Map contains of timestamp mapped by object.- Specified by:
addAllAsyncin interfaceRTimeSeriesAsync<V>- Parameters:
objects- - map of elements to add- Returns:
- void
-
addAllAsync
public RFuture<Void> addAllAsync(Map<Long,V> objects, long timeToLive, TimeUnit timeUnit)
Description copied from interface:RTimeSeriesAsyncAdds all elements contained in the specified map to this time-series collection. Map contains of timestamp mapped by object.- Specified by:
addAllAsyncin interfaceRTimeSeriesAsync<V>- Parameters:
objects- - map of elements to addtimeToLive- - time to live intervaltimeUnit- - unit of time to live interval- Returns:
- void
-
size
public int size()
Description copied from interface:RTimeSeriesReturns size of this set.- Specified by:
sizein interfaceRTimeSeries<V>- Returns:
- size
-
sizeAsync
public RFuture<Integer> sizeAsync()
Description copied from interface:RTimeSeriesAsyncReturns size of this set.- Specified by:
sizeAsyncin interfaceRTimeSeriesAsync<V>- Returns:
- size
-
get
public V get(long timestamp)
Description copied from interface:RTimeSeriesReturns object by specifiedtimestampornullif it doesn't exist.- Specified by:
getin interfaceRTimeSeries<V>- Parameters:
timestamp- - object timestamp- Returns:
- object
-
getAsync
public RFuture<V> getAsync(long timestamp)
Description copied from interface:RTimeSeriesAsyncReturns object by specifiedtimestampornullif it doesn't exist.- Specified by:
getAsyncin interfaceRTimeSeriesAsync<V>- Parameters:
timestamp- - object timestamp- Returns:
- object
-
remove
public boolean remove(long timestamp)
Description copied from interface:RTimeSeriesRemoves object by specifiedtimestamp.- Specified by:
removein interfaceRTimeSeries<V>- Parameters:
timestamp- - object timestamp- Returns:
trueif an element was removed as a result of this call
-
removeAsync
public RFuture<Boolean> removeAsync(long timestamp)
Description copied from interface:RTimeSeriesAsyncRemoves object by specifiedtimestamp.- Specified by:
removeAsyncin interfaceRTimeSeriesAsync<V>- Parameters:
timestamp- - object timestamp- Returns:
trueif an element was removed as a result of this call
-
last
public V last()
Description copied from interface:RTimeSeriesReturns the tail element ornullif this time-series collection is empty.- Specified by:
lastin interfaceRTimeSeries<V>- Returns:
- the tail element or
nullif this time-series collection is empty
-
lastAsync
public RFuture<V> lastAsync()
Description copied from interface:RTimeSeriesAsyncReturns the tail element ornullif this time-series collection is empty.- Specified by:
lastAsyncin interfaceRTimeSeriesAsync<V>- Returns:
- the tail element or
nullif this time-series collection is empty
-
lastAsync
public RFuture<Collection<V>> lastAsync(int count)
Description copied from interface:RTimeSeriesAsyncReturns the tail elements of this time-series collection.- Specified by:
lastAsyncin interfaceRTimeSeriesAsync<V>- Parameters:
count- - elements amount- Returns:
- the tail elements
-
first
public V first()
Description copied from interface:RTimeSeriesReturns the head element ornullif this time-series collection is empty.- Specified by:
firstin interfaceRTimeSeries<V>- Returns:
- the head element or
nullif this time-series collection is empty
-
firstAsync
public RFuture<V> firstAsync()
Description copied from interface:RTimeSeriesAsyncReturns the head element ornullif this time-series collection is empty.- Specified by:
firstAsyncin interfaceRTimeSeriesAsync<V>- Returns:
- the head element or
nullif this time-series collection is empty
-
firstAsync
public RFuture<Collection<V>> firstAsync(int count)
Description copied from interface:RTimeSeriesAsyncReturns the head elements of this time-series collection.- Specified by:
firstAsyncin interfaceRTimeSeriesAsync<V>- Parameters:
count- - elements amount- Returns:
- the head elements
-
first
public Collection<V> first(int count)
Description copied from interface:RTimeSeriesReturns the head elements of this time-series collection.- Specified by:
firstin interfaceRTimeSeries<V>- Parameters:
count- - elements amount- Returns:
- the head elements
-
last
public Collection<V> last(int count)
Description copied from interface:RTimeSeriesReturns the tail elements of this time-series collection.- Specified by:
lastin interfaceRTimeSeries<V>- Parameters:
count- - elements amount- Returns:
- the tail elements
-
firstTimestamp
public Long firstTimestamp()
Description copied from interface:RTimeSeriesReturns timestamp of the head timestamp ornullif this time-series collection is empty.- Specified by:
firstTimestampin interfaceRTimeSeries<V>- Returns:
- timestamp or
nullif this time-series collection is empty
-
firstTimestampAsync
public RFuture<Long> firstTimestampAsync()
Description copied from interface:RTimeSeriesAsyncReturns timestamp of the head timestamp ornullif this time-series collection is empty.- Specified by:
firstTimestampAsyncin interfaceRTimeSeriesAsync<V>- Returns:
- timestamp or
nullif this time-series collection is empty
-
lastTimestamp
public Long lastTimestamp()
Description copied from interface:RTimeSeriesReturns timestamp of the tail element ornullif this time-series collection is empty.- Specified by:
lastTimestampin interfaceRTimeSeries<V>- Returns:
- timestamp or
nullif this time-series collection is empty
-
lastTimestampAsync
public RFuture<Long> lastTimestampAsync()
Description copied from interface:RTimeSeriesAsyncReturns timestamp of the tail element ornullif this time-series collection is empty.- Specified by:
lastTimestampAsyncin interfaceRTimeSeriesAsync<V>- Returns:
- timestamp or
nullif this time-series collection is empty
-
removeRange
public int removeRange(long startTimestamp, long endTimestamp)Description copied from interface:RTimeSeriesRemoves values within timestamp range. Including boundary values.- Specified by:
removeRangein interfaceRTimeSeries<V>- Parameters:
startTimestamp- - start timestampendTimestamp- - end timestamp- Returns:
- number of removed elements
-
removeRangeAsync
public RFuture<Integer> removeRangeAsync(long startTimestamp, long endTimestamp)
Description copied from interface:RTimeSeriesAsyncRemoves values within timestamp range. Including boundary values.- Specified by:
removeRangeAsyncin interfaceRTimeSeriesAsync<V>- Parameters:
startTimestamp- - start timestampendTimestamp- - end timestamp- Returns:
- number of removed elements
-
range
public Collection<V> range(long startTimestamp, long endTimestamp)
Description copied from interface:RTimeSeriesReturns ordered elements of this time-series collection within timestamp range. Including boundary values.- Specified by:
rangein interfaceRTimeSeries<V>- Parameters:
startTimestamp- - start timestampendTimestamp- - end timestamp- Returns:
- elements collection
-
entryRange
public Collection<TimeSeriesEntry<V>> entryRange(long startTimestamp, long endTimestamp)
Description copied from interface:RTimeSeriesReturns ordered entries of this time-series collection within timestamp range. Including boundary values.- Specified by:
entryRangein interfaceRTimeSeries<V>- Parameters:
startTimestamp- - start timestampendTimestamp- - end timestamp- Returns:
- elements collection
-
entryRangeReversed
public Collection<TimeSeriesEntry<V>> entryRangeReversed(long startTimestamp, long endTimestamp)
Description copied from interface:RTimeSeriesReturns entries of this time-series collection in reverse order within timestamp range. Including boundary values.- Specified by:
entryRangeReversedin interfaceRTimeSeries<V>- Parameters:
startTimestamp- - start timestampendTimestamp- - end timestamp- Returns:
- elements collection
-
entryRangeReversedAsync
public RFuture<Collection<TimeSeriesEntry<V>>> entryRangeReversedAsync(long startTimestamp, long endTimestamp)
Description copied from interface:RTimeSeriesAsyncReturns entries of this time-series collection in reverse order within timestamp range. Including boundary values.- Specified by:
entryRangeReversedAsyncin interfaceRTimeSeriesAsync<V>- Parameters:
startTimestamp- - start timestampendTimestamp- - end timestamp- Returns:
- elements collection
-
entryRangeAsync
public RFuture<Collection<TimeSeriesEntry<V>>> entryRangeAsync(long startTimestamp, long endTimestamp)
Description copied from interface:RTimeSeriesAsyncReturns ordered entries of this time-series collection within timestamp range. Including boundary values.- Specified by:
entryRangeAsyncin interfaceRTimeSeriesAsync<V>- Parameters:
startTimestamp- - start timestampendTimestamp- - end timestamp- Returns:
- elements collection
-
entryRangeAsync
public RFuture<Collection<TimeSeriesEntry<V>>> entryRangeAsync(boolean reverse, long startTimestamp, long endTimestamp)
-
rangeAsync
public RFuture<Collection<V>> rangeAsync(long startTimestamp, long endTimestamp)
Description copied from interface:RTimeSeriesAsyncReturns ordered elements of this time-series collection within timestamp range. Including boundary values.- Specified by:
rangeAsyncin interfaceRTimeSeriesAsync<V>- Parameters:
startTimestamp- - start timestampendTimestamp- - end timestamp- Returns:
- elements collection
-
rangeReversed
public Collection<V> rangeReversed(long startTimestamp, long endTimestamp)
Description copied from interface:RTimeSeriesReturns elements of this time-series collection in reverse order within timestamp range. Including boundary values.- Specified by:
rangeReversedin interfaceRTimeSeries<V>- Parameters:
startTimestamp- - start timestampendTimestamp- - end timestamp- Returns:
- elements collection
-
rangeReversedAsync
public RFuture<Collection<V>> rangeReversedAsync(long startTimestamp, long endTimestamp)
Description copied from interface:RTimeSeriesAsyncReturns elements of this time-series collection in reverse order within timestamp range. Including boundary values.- Specified by:
rangeReversedAsyncin interfaceRTimeSeriesAsync<V>- Parameters:
startTimestamp- - start timestampendTimestamp- - end timestamp- Returns:
- elements collection
-
pollFirst
public Collection<V> pollFirst(int count)
Description copied from interface:RTimeSeriesRemoves and returns the head elements ornullif this time-series collection is empty.- Specified by:
pollFirstin interfaceRTimeSeries<V>- Parameters:
count- - elements amount- Returns:
- the head element,
or
nullif this time-series collection is empty
-
pollLast
public Collection<V> pollLast(int count)
Description copied from interface:RTimeSeriesRemoves and returns the tail elements ornullif this time-series collection is empty.- Specified by:
pollLastin interfaceRTimeSeries<V>- Parameters:
count- - elements amount- Returns:
- the tail element or
nullif this time-series collection is empty
-
pollFirstAsync
public RFuture<Collection<V>> pollFirstAsync(int count)
Description copied from interface:RTimeSeriesAsyncRemoves and returns the head elements ornullif this time-series collection is empty.- Specified by:
pollFirstAsyncin interfaceRTimeSeriesAsync<V>- Parameters:
count- - elements amount- Returns:
- the head element,
or
nullif this time-series collection is empty
-
pollLastAsync
public RFuture<Collection<V>> pollLastAsync(int count)
Description copied from interface:RTimeSeriesAsyncRemoves and returns the tail elements ornullif this time-series collection is empty.- Specified by:
pollLastAsyncin interfaceRTimeSeriesAsync<V>- Parameters:
count- - elements amount- Returns:
- the tail element or
nullif this time-series collection is empty
-
pollFirst
public V pollFirst()
Description copied from interface:RTimeSeriesRemoves and returns the head element ornullif this time-series collection is empty.- Specified by:
pollFirstin interfaceRTimeSeries<V>- Returns:
- the head element,
or
nullif this time-series collection is empty
-
pollLast
public V pollLast()
Description copied from interface:RTimeSeriesRemoves and returns the tail element ornullif this time-series collection is empty.- Specified by:
pollLastin interfaceRTimeSeries<V>- Returns:
- the tail element or
nullif this time-series collection is empty
-
pollFirstAsync
public RFuture<V> pollFirstAsync()
Description copied from interface:RTimeSeriesAsyncRemoves and returns the head element ornullif this time-series collection is empty.- Specified by:
pollFirstAsyncin interfaceRTimeSeriesAsync<V>- Returns:
- the head element,
or
nullif this time-series collection is empty
-
pollLastAsync
public RFuture<V> pollLastAsync()
Description copied from interface:RTimeSeriesAsyncRemoves and returns the tail element ornullif this time-series collection is empty.- Specified by:
pollLastAsyncin interfaceRTimeSeriesAsync<V>- Returns:
- the tail element or
nullif this time-series collection is empty
-
scanIterator
public ListScanResult<Object> scanIterator(String name, RedisClient client, long startPos, int count)
-
scanIteratorAsync
public RFuture<ListScanResult<Object>> scanIteratorAsync(String name, RedisClient client, long startPos, int count)
-
iterator
public Iterator<V> iterator(int count)
Description copied from interface:RTimeSeriesReturns an iterator over elements in this time-series collection. Elements are loaded in batch. Batch size is defined bycountparam.- Specified by:
iteratorin interfaceRTimeSeries<V>- Parameters:
count- - size of elements batch- Returns:
- iterator
-
stream
public Stream<V> stream()
Description copied from interface:RTimeSeriesReturns stream of elements in this time-series collection. Elements are loaded in batch. Batch size is 10.- Specified by:
streamin interfaceRTimeSeries<V>- Returns:
- stream of elements
-
stream
public Stream<V> stream(int count)
Description copied from interface:RTimeSeriesReturns stream of elements in this time-series collection. Elements are loaded in batch. Batch size is defined bycountparam.- Specified by:
streamin interfaceRTimeSeries<V>- Parameters:
count- - size of elements batch- Returns:
- stream of elements
-
destroy
public void destroy()
Description copied from interface:RDestroyableDestroys object when it's not necessary anymore.- Specified by:
destroyin interfaceRDestroyable
-
deleteAsync
public RFuture<Boolean> deleteAsync()
Description copied from interface:RObjectAsyncDelete object in async mode- Specified by:
deleteAsyncin interfaceRObjectAsync- Overrides:
deleteAsyncin classRedissonObject- Returns:
trueif object was deletedfalseif not
-
expireAsync
public RFuture<Boolean> expireAsync(long timeToLive, TimeUnit timeUnit)
Description copied from interface:RExpirableAsyncSet a timeout for object in async mode. After the timeout has expired, the key will automatically be deleted.- Specified by:
expireAsyncin interfaceRExpirableAsync- Parameters:
timeToLive- - timeout before object will be deletedtimeUnit- - timeout time unit- Returns:
trueif the timeout was set andfalseif not
-
clearExpireAsync
public RFuture<Boolean> clearExpireAsync()
Description copied from interface:RExpirableAsyncClear an expire timeout or expire date for object in async mode. Object will not be deleted.- Specified by:
clearExpireAsyncin interfaceRExpirableAsync- Returns:
trueif the timeout was cleared andfalseif not
-
sizeInMemoryAsync
public RFuture<Long> sizeInMemoryAsync()
Description copied from interface:RObjectAsyncReturns bytes amount used by object in Redis memory.- Specified by:
sizeInMemoryAsyncin interfaceRObjectAsync- Overrides:
sizeInMemoryAsyncin classRedissonObject- Returns:
- size in bytes
-
expire
public boolean expire(long timeToLive, TimeUnit timeUnit)Description copied from interface:RExpirableSet a timeout for object. After the timeout has expired, the key will automatically be deleted.- Specified by:
expirein interfaceRExpirable- Parameters:
timeToLive- - timeout before object will be deletedtimeUnit- - timeout time unit- Returns:
trueif the timeout was set andfalseif not
-
expireAt
public boolean expireAt(long timestamp)
Description copied from interface:RExpirableUseRExpirable.expire(Instant)instead- Specified by:
expireAtin interfaceRExpirable- Parameters:
timestamp- - expire date in milliseconds (Unix timestamp)- Returns:
trueif the timeout was set andfalseif not
-
expireAtAsync
public RFuture<Boolean> expireAtAsync(long timestamp)
Description copied from interface:RExpirableAsyncUseRExpirableAsync.expireAsync(Instant)instead- Specified by:
expireAtAsyncin interfaceRExpirableAsync- Parameters:
timestamp- - expire date in milliseconds (Unix timestamp)- Returns:
trueif the timeout was set andfalseif not
-
expire
public boolean expire(Instant instant)
Description copied from interface:RExpirableSet an expire date for object. When expire date comes the key will automatically be deleted.- Specified by:
expirein interfaceRExpirable- Parameters:
instant- - expire date- Returns:
trueif the timeout was set andfalseif not
-
expireAsync
public RFuture<Boolean> expireAsync(Instant instant)
Description copied from interface:RExpirableAsyncSet an expire date for object. When expire date comes the key will automatically be deleted.- Specified by:
expireAsyncin interfaceRExpirableAsync- Parameters:
instant- - expire date- Returns:
trueif the timeout was set andfalseif not
-
expireAt
public boolean expireAt(Date timestamp)
Description copied from interface:RExpirableUseRExpirable.expire(Instant)instead- Specified by:
expireAtin interfaceRExpirable- Parameters:
timestamp- - expire date- Returns:
trueif the timeout was set andfalseif not
-
expireAtAsync
public RFuture<Boolean> expireAtAsync(Date timestamp)
Description copied from interface:RExpirableAsyncUseRExpirableAsync.expireAsync(Instant)instead- Specified by:
expireAtAsyncin interfaceRExpirableAsync- Parameters:
timestamp- - expire date- Returns:
trueif the timeout was set andfalseif not
-
clearExpire
public boolean clearExpire()
Description copied from interface:RExpirableClear an expire timeout or expire date for object.- Specified by:
clearExpirein interfaceRExpirable- Returns:
trueif timeout was removedfalseif object does not exist or does not have an associated timeout
-
remainTimeToLive
public long remainTimeToLive()
Description copied from interface:RExpirableRemaining time to live of Redisson object that has a timeout- Specified by:
remainTimeToLivein interfaceRExpirable- Returns:
- time in milliseconds -2 if the key does not exist. -1 if the key exists but has no associated expire.
-
remainTimeToLiveAsync
public RFuture<Long> remainTimeToLiveAsync()
Description copied from interface:RExpirableAsyncRemaining time to live of Redisson object that has a timeout- Specified by:
remainTimeToLiveAsyncin interfaceRExpirableAsync- Returns:
- time in milliseconds -2 if the key does not exist. -1 if the key exists but has no associated expire.
-
expireAsync
protected RFuture<Boolean> expireAsync(long timeToLive, TimeUnit timeUnit, String... keys)
-
-