Package org.redisson.api
Interface RTimeSeriesAsync<V>
-
- All Superinterfaces:
RExpirableAsync
,RObjectAsync
- All Known Subinterfaces:
RTimeSeries<V>
- All Known Implementing Classes:
RedissonTimeSeries
public interface RTimeSeriesAsync<V> extends RExpirableAsync
Async interface for Redis based time-series collection.- Author:
- Nikita Koksharov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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
.RFuture<Collection<TimeSeriesEntry<V>>>
entryRangeAsync(long startTimestamp, long endTimestamp)
Returns ordered entries of this time-series collection 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.RFuture<V>
firstAsync()
Returns the head element ornull
if this time-series collection is empty.RFuture<Collection<V>>
firstAsync(int count)
Returns the head elements of this time-series collection.RFuture<Long>
firstTimestampAsync()
Returns timestamp of the head timestamp ornull
if this time-series collection is empty.RFuture<V>
getAsync(long timestamp)
Returns object by specifiedtimestamp
ornull
if it doesn't exist.RFuture<V>
lastAsync()
Returns the tail element ornull
if this time-series collection is empty.RFuture<Collection<V>>
lastAsync(int count)
Returns the tail elements of this time-series collection.RFuture<Long>
lastTimestampAsync()
Returns timestamp of the tail element ornull
if this time-series collection is empty.RFuture<V>
pollFirstAsync()
Removes and returns the head element ornull
if this time-series collection is empty.RFuture<Collection<V>>
pollFirstAsync(int count)
Removes and returns the head elements ornull
if this time-series collection is empty.RFuture<V>
pollLastAsync()
Removes and returns the tail element ornull
if this time-series collection is empty.RFuture<Collection<V>>
pollLastAsync(int count)
Removes and returns the tail elements ornull
if this time-series collection is empty.RFuture<Collection<V>>
rangeAsync(long startTimestamp, long endTimestamp)
Returns ordered elements of this time-series collection within timestamp range.RFuture<Collection<V>>
rangeReversedAsync(long startTimestamp, long endTimestamp)
Returns elements of this time-series collection in reverse order within timestamp range.RFuture<Boolean>
removeAsync(long timestamp)
Removes object by specifiedtimestamp
.RFuture<Integer>
removeRangeAsync(long startTimestamp, long endTimestamp)
Removes values within timestamp range.RFuture<Integer>
sizeAsync()
Returns size of this set.-
Methods inherited from interface org.redisson.api.RExpirableAsync
clearExpireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsync
-
Methods inherited from interface org.redisson.api.RObjectAsync
addListenerAsync, copyAsync, deleteAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsync
-
-
-
-
Method Detail
-
addAsync
RFuture<Void> addAsync(long timestamp, V object)
Adds element to this time-series collection by specifiedtimestamp
.- Parameters:
timestamp
- - object timestampobject
- - object itself- Returns:
- void
-
addAllAsync
RFuture<Void> addAllAsync(Map<Long,V> objects)
Adds all elements contained in the specified map to this time-series collection. Map contains of timestamp mapped by object.- Parameters:
objects
- - map of elements to add- Returns:
- void
-
addAsync
RFuture<Void> addAsync(long timestamp, V object, long timeToLive, TimeUnit timeUnit)
Adds element to this time-series collection by specifiedtimestamp
.- Parameters:
timestamp
- - object timestampobject
- - object itselftimeToLive
- - time to live intervaltimeUnit
- - unit of time to live interval- Returns:
- void
-
addAllAsync
RFuture<Void> addAllAsync(Map<Long,V> objects, long timeToLive, TimeUnit timeUnit)
Adds all elements contained in the specified map to this time-series collection. Map contains of timestamp mapped by object.- Parameters:
objects
- - map of elements to addtimeToLive
- - time to live intervaltimeUnit
- - unit of time to live interval- Returns:
- void
-
getAsync
RFuture<V> getAsync(long timestamp)
Returns object by specifiedtimestamp
ornull
if it doesn't exist.- Parameters:
timestamp
- - object timestamp- Returns:
- object
-
removeAsync
RFuture<Boolean> removeAsync(long timestamp)
Removes object by specifiedtimestamp
.- Parameters:
timestamp
- - object timestamp- Returns:
true
if an element was removed as a result of this call
-
pollFirstAsync
RFuture<Collection<V>> pollFirstAsync(int count)
Removes and returns the head elements ornull
if this time-series collection is empty.- Parameters:
count
- - elements amount- Returns:
- the head element,
or
null
if this time-series collection is empty
-
pollLastAsync
RFuture<Collection<V>> pollLastAsync(int count)
Removes and returns the tail elements ornull
if this time-series collection is empty.- Parameters:
count
- - elements amount- Returns:
- the tail element or
null
if this time-series collection is empty
-
pollFirstAsync
RFuture<V> pollFirstAsync()
Removes and returns the head element ornull
if this time-series collection is empty.- Returns:
- the head element,
or
null
if this time-series collection is empty
-
pollLastAsync
RFuture<V> pollLastAsync()
Removes and returns the tail element ornull
if this time-series collection is empty.- Returns:
- the tail element or
null
if this time-series collection is empty
-
lastAsync
RFuture<V> lastAsync()
Returns the tail element ornull
if this time-series collection is empty.- Returns:
- the tail element or
null
if this time-series collection is empty
-
firstAsync
RFuture<V> firstAsync()
Returns the head element ornull
if this time-series collection is empty.- Returns:
- the head element or
null
if this time-series collection is empty
-
firstTimestampAsync
RFuture<Long> firstTimestampAsync()
Returns timestamp of the head timestamp ornull
if this time-series collection is empty.- Returns:
- timestamp or
null
if this time-series collection is empty
-
lastTimestampAsync
RFuture<Long> lastTimestampAsync()
Returns timestamp of the tail element ornull
if this time-series collection is empty.- Returns:
- timestamp or
null
if this time-series collection is empty
-
lastAsync
RFuture<Collection<V>> lastAsync(int count)
Returns the tail elements of this time-series collection.- Parameters:
count
- - elements amount- Returns:
- the tail elements
-
firstAsync
RFuture<Collection<V>> firstAsync(int count)
Returns the head elements of this time-series collection.- Parameters:
count
- - elements amount- Returns:
- the head elements
-
removeRangeAsync
RFuture<Integer> removeRangeAsync(long startTimestamp, long endTimestamp)
Removes values within timestamp range. Including boundary values.- Parameters:
startTimestamp
- - start timestampendTimestamp
- - end timestamp- Returns:
- number of removed elements
-
rangeAsync
RFuture<Collection<V>> rangeAsync(long startTimestamp, long endTimestamp)
Returns ordered elements of this time-series collection within timestamp range. Including boundary values.- Parameters:
startTimestamp
- - start timestampendTimestamp
- - end timestamp- Returns:
- elements collection
-
rangeReversedAsync
RFuture<Collection<V>> rangeReversedAsync(long startTimestamp, long endTimestamp)
Returns elements of this time-series collection in reverse order within timestamp range. Including boundary values.- Parameters:
startTimestamp
- - start timestampendTimestamp
- - end timestamp- Returns:
- elements collection
-
entryRangeAsync
RFuture<Collection<TimeSeriesEntry<V>>> entryRangeAsync(long startTimestamp, long endTimestamp)
Returns ordered entries of this time-series collection within timestamp range. Including boundary values.- Parameters:
startTimestamp
- - start timestampendTimestamp
- - end timestamp- Returns:
- elements collection
-
entryRangeReversedAsync
RFuture<Collection<TimeSeriesEntry<V>>> entryRangeReversedAsync(long startTimestamp, long endTimestamp)
Returns entries of this time-series collection in reverse order within timestamp range. Including boundary values.- Parameters:
startTimestamp
- - start timestampendTimestamp
- - end timestamp- Returns:
- elements collection
-
-