Package org.redisson.api
Interface RTimeSeriesAsync<V,L>
- Type Parameters:
V
- value typeL
- label type
- All Superinterfaces:
RExpirableAsync
,RObjectAsync
- All Known Subinterfaces:
RTimeSeries<V,
L>
- All Known Implementing Classes:
RedissonTimeSeries
Async interface for Redis based time-series collection.
- Author:
- Nikita Koksharov
-
Method Summary
Modifier and TypeMethodDescriptionaddAllAsync
(Collection<TimeSeriesEntry<V, L>> entries) Adds all entries collection to this time-series collection.addAllAsync
(Collection<TimeSeriesEntry<V, L>> entries, Duration timeToLive) Adds all time series entries collection to this time-series collection.addAllAsync
(Map<Long, V> objects) Adds all elements contained in the specified map to this time-series collection.addAllAsync
(Map<Long, V> objects, long timeToLive, TimeUnit timeUnit) Adds all elements contained in the specified map to this time-series collection.Adds element to this time-series collection by specifiedtimestamp
.Adds element to this time-series collection by specifiedtimestamp
.Adds element withlabel
to this time-series collection by specifiedtimestamp
.Adds element withlabel
to this time-series collection by specifiedtimestamp
.entryRangeAsync
(long startTimestamp, long endTimestamp) Returns ordered entries of this time-series collection within timestamp range.entryRangeAsync
(long startTimestamp, long endTimestamp, int limit) Returns ordered entries of this time-series collection within timestamp range.entryRangeReversedAsync
(long startTimestamp, long endTimestamp) Returns entries of this time-series collection in reverse order within timestamp range.entryRangeReversedAsync
(long startTimestamp, long endTimestamp, int limit) Returns entries of this time-series collection in reverse order within timestamp range.Returns the head element ornull
if this time-series collection is empty.firstAsync
(int count) Returns the head elements of this time-series collection.firstEntriesAsync
(int count) Returns the head entries of this time-series collection.Returns the head entry ornull
if this time-series collection is empty.Returns timestamp of the head timestamp ornull
if this time-series collection is empty.getAndRemoveAsync
(long timestamp) Removes and returns object by specifiedtimestamp
.getAndRemoveEntryAsync
(long timestamp) Removes and returns entry by specifiedtimestamp
.getAsync
(long timestamp) Returns object by specifiedtimestamp
ornull
if it doesn't exist.getEntryAsync
(long timestamp) Returns time series entry by specifiedtimestamp
ornull
if it doesn't exist.Returns the tail element ornull
if this time-series collection is empty.lastAsync
(int count) Returns the tail elements of this time-series collection.lastEntriesAsync
(int count) Returns the tail entries of this time-series collection.Returns the tail entry ornull
if this time-series collection is empty.Returns timestamp of the tail element ornull
if this time-series collection is empty.Removes and returns the head element ornull
if this time-series collection is empty.pollFirstAsync
(int count) Removes and returns the head elementspollFirstEntriesAsync
(int count) Removes and returns head entriesRemoves and returns head entry ornull
if this time-series collection is empty.Removes and returns the tail element ornull
if this time-series collection is empty.pollLastAsync
(int count) Removes and returns the tail elements ornull
if this time-series collection is empty.pollLastEntriesAsync
(int count) Removes and returns tail entriesRemoves and returns the tail entry ornull
if this time-series collection is empty.rangeAsync
(long startTimestamp, long endTimestamp) Returns ordered elements of this time-series collection within timestamp range.rangeAsync
(long startTimestamp, long endTimestamp, int limit) Returns ordered elements of this time-series collection within timestamp range.rangeReversedAsync
(long startTimestamp, long endTimestamp) Returns elements of this time-series collection in reverse order within timestamp range.rangeReversedAsync
(long startTimestamp, long endTimestamp, int limit) Returns elements of this time-series collection in reverse order within timestamp range.removeAsync
(long timestamp) Removes object by specifiedtimestamp
.removeRangeAsync
(long startTimestamp, long endTimestamp) Removes values within timestamp range.Returns size of this set.Methods inherited from interface org.redisson.api.RExpirableAsync
clearExpireAsync, expireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, expireIfGreaterAsync, expireIfGreaterAsync, expireIfLessAsync, expireIfLessAsync, expireIfNotSetAsync, expireIfNotSetAsync, expireIfSetAsync, expireIfSetAsync, getExpireTimeAsync, 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 Details
-
addAsync
Adds element to this time-series collection by specifiedtimestamp
.- Parameters:
timestamp
- object timestampobject
- object itself- Returns:
- void
-
addAsync
Adds element withlabel
to this time-series collection by specifiedtimestamp
.- Parameters:
timestamp
- object timestampobject
- object itselflabel
- object label
-
addAllAsync
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
-
addAllAsync
Adds all entries collection to this time-series collection.- Parameters:
entries
- collection of time series entries- Returns:
- void
-
addAsync
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
-
addAsync
Adds element withlabel
to this time-series collection by specifiedtimestamp
.- Parameters:
timestamp
- object timestampobject
- object itselflabel
- object labeltimeToLive
- time to live interval- Returns:
- void
-
addAllAsync
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
-
addAllAsync
Adds all time series entries collection to this time-series collection. Specified time to live interval applied to all entries defined in collection.- Parameters:
entries
- collection of time series entriestimeToLive
- time to live interval- Returns:
- void
-
sizeAsync
Returns size of this set.- Returns:
- size
-
getAsync
Returns object by specifiedtimestamp
ornull
if it doesn't exist.- Parameters:
timestamp
- - object timestamp- Returns:
- object
-
getEntryAsync
Returns time series entry by specifiedtimestamp
ornull
if it doesn't exist.- Parameters:
timestamp
- object timestamp- Returns:
- time series entry
-
removeAsync
Removes object by specifiedtimestamp
.- Parameters:
timestamp
- - object timestamp- Returns:
true
if an element was removed as a result of this call
-
getAndRemoveAsync
Removes and returns object by specifiedtimestamp
.- Parameters:
timestamp
- - object timestamp- Returns:
- object or
null
if it doesn't exist
-
getAndRemoveEntryAsync
Removes and returns entry by specifiedtimestamp
.- Parameters:
timestamp
- - object timestamp- Returns:
- entry or
null
if it doesn't exist
-
pollFirstAsync
Removes and returns the head elements- Parameters:
count
- - elements amount- Returns:
- collection of head elements
-
pollFirstEntriesAsync
Removes and returns head entries- Parameters:
count
- - entries amount- Returns:
- collection of head entries
-
pollLastAsync
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
-
pollLastEntriesAsync
Removes and returns tail entries- Parameters:
count
- - entries amount- Returns:
- collection of tail entries
-
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
-
pollFirstEntryAsync
RFuture<TimeSeriesEntry<V,L>> pollFirstEntryAsync()Removes and returns head entry ornull
if this time-series collection is empty.- Returns:
- the head entry,
or
null
if this time-series collection is empty
-
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
-
pollLastEntryAsync
RFuture<TimeSeriesEntry<V,L>> pollLastEntryAsync()Removes and returns the tail entry ornull
if this time-series collection is empty.- Returns:
- the tail entry or
null
if this time-series collection is empty
-
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
-
lastEntryAsync
RFuture<TimeSeriesEntry<V,L>> lastEntryAsync()Returns the tail entry ornull
if this time-series collection is empty.- Returns:
- the tail entry or
null
if this time-series collection is empty
-
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
-
firstEntryAsync
RFuture<TimeSeriesEntry<V,L>> firstEntryAsync()Returns the head entry ornull
if this time-series collection is empty.- Returns:
- the head entry or
null
if this time-series collection is empty
-
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
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
Returns the tail elements of this time-series collection.- Parameters:
count
- - elements amount- Returns:
- the tail elements
-
lastEntriesAsync
Returns the tail entries of this time-series collection.- Parameters:
count
- - entries amount- Returns:
- the tail entries
-
firstAsync
Returns the head elements of this time-series collection.- Parameters:
count
- - elements amount- Returns:
- the head elements
-
firstEntriesAsync
Returns the head entries of this time-series collection.- Parameters:
count
- - entries amount- Returns:
- the head entries
-
removeRangeAsync
Removes values within timestamp range. Including boundary values.- Parameters:
startTimestamp
- - start timestampendTimestamp
- - end timestamp- Returns:
- number of removed elements
-
rangeAsync
Returns ordered elements of this time-series collection within timestamp range. Including boundary values.- Parameters:
startTimestamp
- - start timestampendTimestamp
- - end timestamp- Returns:
- elements collection
-
rangeAsync
Returns ordered elements of this time-series collection within timestamp range. Including boundary values.- Parameters:
startTimestamp
- start timestampendTimestamp
- end timestamplimit
- result size limit- Returns:
- elements collection
-
rangeReversedAsync
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
-
rangeReversedAsync
Returns elements of this time-series collection in reverse order within timestamp range. Including boundary values.- Parameters:
startTimestamp
- start timestampendTimestamp
- end timestamplimit
- result size limit- Returns:
- elements collection
-
entryRangeAsync
Returns ordered entries of this time-series collection within timestamp range. Including boundary values.- Parameters:
startTimestamp
- - start timestampendTimestamp
- - end timestamp- Returns:
- elements collection
-
entryRangeAsync
RFuture<Collection<TimeSeriesEntry<V,L>>> entryRangeAsync(long startTimestamp, long endTimestamp, int limit) Returns ordered entries of this time-series collection within timestamp range. Including boundary values.- Parameters:
startTimestamp
- start timestampendTimestamp
- end timestamplimit
- result size limit- Returns:
- elements collection
-
entryRangeReversedAsync
RFuture<Collection<TimeSeriesEntry<V,L>>> 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
-
entryRangeReversedAsync
RFuture<Collection<TimeSeriesEntry<V,L>>> entryRangeReversedAsync(long startTimestamp, long endTimestamp, int limit) Returns entries of this time-series collection in reverse order within timestamp range. Including boundary values.- Parameters:
startTimestamp
- start timestampendTimestamp
- end timestamplimit
- result size limit- Returns:
- elements collection
-