Package org.redisson.api
Interface RTimeSeriesRx<V,L>
- Type Parameters:
V
- value typeL
- label type
- All Superinterfaces:
RExpirableRx
,RObjectRx
Rx interface for Redis based time-series collection.
- Author:
- Nikita Koksharov
-
Method Summary
Modifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Completable
Adds element to this time-series collection by specifiedtimestamp
.io.reactivex.rxjava3.core.Completable
Adds element to this time-series collection by specifiedtimestamp
.io.reactivex.rxjava3.core.Completable
Adds element withlabel
to this time-series collection by specifiedtimestamp
.io.reactivex.rxjava3.core.Completable
Adds element withlabel
to this time-series collection by specifiedtimestamp
.io.reactivex.rxjava3.core.Completable
addAll
(Collection<TimeSeriesEntry<V, L>> entries) Adds all entries collection to this time-series collection.io.reactivex.rxjava3.core.Completable
addAll
(Collection<TimeSeriesEntry<V, L>> entries, Duration timeToLive) Adds all time series entries collection to this time-series collection.io.reactivex.rxjava3.core.Completable
Adds all elements contained in the specified map to this time-series collection.io.reactivex.rxjava3.core.Completable
Adds all elements contained in the specified map to this time-series collection.io.reactivex.rxjava3.core.Single
<Collection<TimeSeriesEntry<V, L>>> entryRange
(long startTimestamp, long endTimestamp) Returns ordered entries of this time-series collection within timestamp range.io.reactivex.rxjava3.core.Single
<Collection<TimeSeriesEntry<V, L>>> entryRange
(long startTimestamp, long endTimestamp, int limit) Returns ordered entries of this time-series collection within timestamp range.io.reactivex.rxjava3.core.Single
<Collection<TimeSeriesEntry<V, L>>> entryRangeReversed
(long startTimestamp, long endTimestamp) Returns entries of this time-series collection in reverse order within timestamp range.io.reactivex.rxjava3.core.Single
<Collection<TimeSeriesEntry<V, L>>> entryRangeReversed
(long startTimestamp, long endTimestamp, int limit) Returns entries of this time-series collection in reverse order within timestamp range.io.reactivex.rxjava3.core.Maybe
<V> first()
Returns the head element ornull
if this time-series collection is empty.io.reactivex.rxjava3.core.Single
<Collection<V>> first
(int count) Returns the head elements of this time-series collection.io.reactivex.rxjava3.core.Single
<Collection<TimeSeriesEntry<V, L>>> firstEntries
(int count) Returns the head entries of this time-series collection.io.reactivex.rxjava3.core.Maybe
<TimeSeriesEntry<V, L>> Returns the head entry ornull
if this time-series collection is empty.io.reactivex.rxjava3.core.Single
<Long> Returns timestamp of the head timestamp ornull
if this time-series collection is empty.io.reactivex.rxjava3.core.Maybe
<V> get
(long timestamp) Returns object by specifiedtimestamp
ornull
if it doesn't exist.io.reactivex.rxjava3.core.Maybe
<V> getAndRemove
(long timestamp) Removes and returns object by specifiedtimestamp
.io.reactivex.rxjava3.core.Maybe
<TimeSeriesEntry<V, L>> getAndRemoveEntry
(long timestamp) Removes and returns entry by specifiedtimestamp
.io.reactivex.rxjava3.core.Maybe
<TimeSeriesEntry<V, L>> getEntry
(long timestamp) Returns time series entry by specifiedtimestamp
ornull
if it doesn't exist.io.reactivex.rxjava3.core.Flowable
<V> iterator()
Returns iterator over collection elementsio.reactivex.rxjava3.core.Maybe
<V> last()
Returns the tail element ornull
if this time-series collection is empty.io.reactivex.rxjava3.core.Single
<Collection<V>> last
(int count) Returns the tail elements of this time-series collection.io.reactivex.rxjava3.core.Single
<Collection<TimeSeriesEntry<V, L>>> lastEntries
(int count) Returns the tail entries of this time-series collection.io.reactivex.rxjava3.core.Maybe
<TimeSeriesEntry<V, L>> Returns the tail entry ornull
if this time-series collection is empty.io.reactivex.rxjava3.core.Single
<Long> Returns timestamp of the tail element ornull
if this time-series collection is empty.io.reactivex.rxjava3.core.Maybe
<V> Removes and returns the head element ornull
if this time-series collection is empty.io.reactivex.rxjava3.core.Single
<Collection<V>> pollFirst
(int count) Removes and returns the head elements ornull
if this time-series collection is empty.io.reactivex.rxjava3.core.Single
<Collection<TimeSeriesEntry<V, L>>> pollFirstEntries
(int count) Removes and returns head entriesio.reactivex.rxjava3.core.Maybe
<TimeSeriesEntry<V, L>> Removes and returns head entry ornull
if this time-series collection is empty.io.reactivex.rxjava3.core.Maybe
<V> pollLast()
Removes and returns the tail element ornull
if this time-series collection is empty.io.reactivex.rxjava3.core.Single
<Collection<V>> pollLast
(int count) Removes and returns the tail elements ornull
if this time-series collection is empty.io.reactivex.rxjava3.core.Single
<Collection<TimeSeriesEntry<V, L>>> pollLastEntries
(int count) Removes and returns tail entriesio.reactivex.rxjava3.core.Maybe
<TimeSeriesEntry<V, L>> Removes and returns the tail entry ornull
if this time-series collection is empty.io.reactivex.rxjava3.core.Single
<Collection<V>> range
(long startTimestamp, long endTimestamp) Returns ordered elements of this time-series collection within timestamp range.io.reactivex.rxjava3.core.Single
<Collection<V>> range
(long startTimestamp, long endTimestamp, int limit) Returns ordered elements of this time-series collection within timestamp range.io.reactivex.rxjava3.core.Single
<Collection<V>> rangeReversed
(long startTimestamp, long endTimestamp) Returns elements of this time-series collection in reverse order within timestamp range.io.reactivex.rxjava3.core.Single
<Collection<V>> rangeReversed
(long startTimestamp, long endTimestamp, int limit) Returns elements of this time-series collection in reverse order within timestamp range.io.reactivex.rxjava3.core.Single
<Boolean> remove
(long timestamp) Removes object by specifiedtimestamp
.io.reactivex.rxjava3.core.Single
<Integer> removeRange
(long startTimestamp, long endTimestamp) Removes values within timestamp range.io.reactivex.rxjava3.core.Single
<Integer> size()
Returns size of this set.Methods inherited from interface org.redisson.api.RExpirableRx
clearExpire, expire, expire, expire, expireAt, expireAt, expireIfGreater, expireIfGreater, expireIfLess, expireIfLess, expireIfNotSet, expireIfNotSet, expireIfSet, expireIfSet, getExpireTime, remainTimeToLive
Methods inherited from interface org.redisson.api.RObjectRx
addListener, copy, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlink
-
Method Details
-
iterator
io.reactivex.rxjava3.core.Flowable<V> iterator()Returns iterator over collection elements- Returns:
- iterator
-
add
Adds element to this time-series collection by specifiedtimestamp
.- Parameters:
timestamp
- object timestampobject
- object itself- Returns:
- void
-
add
Adds element withlabel
to this time-series collection by specifiedtimestamp
.- Parameters:
timestamp
- object timestampobject
- object itselflabel
- object label
-
addAll
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
-
addAll
Adds all entries collection to this time-series collection.- Parameters:
entries
- collection of time series entries
-
add
io.reactivex.rxjava3.core.Completable add(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
-
add
Adds element withlabel
to this time-series collection by specifiedtimestamp
.- Parameters:
timestamp
- object timestampobject
- object itselflabel
- object labeltimeToLive
- time to live interval
-
addAll
io.reactivex.rxjava3.core.Completable addAll(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
-
addAll
io.reactivex.rxjava3.core.Completable addAll(Collection<TimeSeriesEntry<V, L>> entries, Duration timeToLive) 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
-
size
io.reactivex.rxjava3.core.Single<Integer> size()Returns size of this set.- Returns:
- size
-
get
Returns object by specifiedtimestamp
ornull
if it doesn't exist.- Parameters:
timestamp
- - object timestamp- Returns:
- object
-
getEntry
Returns time series entry by specifiedtimestamp
ornull
if it doesn't exist.- Parameters:
timestamp
- object timestamp- Returns:
- time series entry
-
remove
Removes object by specifiedtimestamp
.- Parameters:
timestamp
- - object timestamp- Returns:
true
if an element was removed as a result of this call
-
getAndRemove
Removes and returns object by specifiedtimestamp
.- Parameters:
timestamp
- - object timestamp- Returns:
- object or
null
if it doesn't exist
-
getAndRemoveEntry
Removes and returns entry by specifiedtimestamp
.- Parameters:
timestamp
- - object timestamp- Returns:
- entry or
null
if it doesn't exist
-
pollFirst
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
-
pollFirstEntries
Removes and returns head entries- Parameters:
count
- - entries amount- Returns:
- collection of head entries
-
pollLast
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
-
pollLastEntries
Removes and returns tail entries- Parameters:
count
- - entries amount- Returns:
- collection of tail entries
-
pollFirst
io.reactivex.rxjava3.core.Maybe<V> pollFirst()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
-
pollFirstEntry
io.reactivex.rxjava3.core.Maybe<TimeSeriesEntry<V,L>> pollFirstEntry()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
-
pollLast
io.reactivex.rxjava3.core.Maybe<V> pollLast()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
-
pollLastEntry
io.reactivex.rxjava3.core.Maybe<TimeSeriesEntry<V,L>> pollLastEntry()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
-
last
io.reactivex.rxjava3.core.Maybe<V> last()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
-
lastEntry
io.reactivex.rxjava3.core.Maybe<TimeSeriesEntry<V,L>> lastEntry()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
-
first
io.reactivex.rxjava3.core.Maybe<V> first()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
-
firstEntry
io.reactivex.rxjava3.core.Maybe<TimeSeriesEntry<V,L>> firstEntry()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
-
firstTimestamp
io.reactivex.rxjava3.core.Single<Long> firstTimestamp()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
-
lastTimestamp
io.reactivex.rxjava3.core.Single<Long> lastTimestamp()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
-
last
Returns the tail elements of this time-series collection.- Parameters:
count
- - elements amount- Returns:
- the tail elements
-
lastEntries
Returns the tail entries of this time-series collection.- Parameters:
count
- - entries amount- Returns:
- the tail entries
-
first
Returns the head elements of this time-series collection.- Parameters:
count
- - elements amount- Returns:
- the head elements
-
firstEntries
Returns the head entries of this time-series collection.- Parameters:
count
- - entries amount- Returns:
- the head entries
-
removeRange
Removes values within timestamp range. Including boundary values.- Parameters:
startTimestamp
- - start timestampendTimestamp
- - end timestamp- Returns:
- number of removed elements
-
range
Returns ordered elements of this time-series collection within timestamp range. Including boundary values.- Parameters:
startTimestamp
- - start timestampendTimestamp
- - end timestamp- Returns:
- elements collection
-
range
io.reactivex.rxjava3.core.Single<Collection<V>> range(long startTimestamp, long endTimestamp, int limit) 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
-
rangeReversed
io.reactivex.rxjava3.core.Single<Collection<V>> rangeReversed(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
-
rangeReversed
io.reactivex.rxjava3.core.Single<Collection<V>> rangeReversed(long startTimestamp, long endTimestamp, int limit) 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
-
entryRange
io.reactivex.rxjava3.core.Single<Collection<TimeSeriesEntry<V,L>>> entryRange(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
-
entryRange
io.reactivex.rxjava3.core.Single<Collection<TimeSeriesEntry<V,L>>> entryRange(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
-
entryRangeReversed
io.reactivex.rxjava3.core.Single<Collection<TimeSeriesEntry<V,L>>> entryRangeReversed(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
-
entryRangeReversed
io.reactivex.rxjava3.core.Single<Collection<TimeSeriesEntry<V,L>>> entryRangeReversed(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
-