public interface RTimeSeries<V> extends RExpirable, Iterable<V>, RTimeSeriesAsync<V>, RDestroyable
| Modifier and Type | Method and Description |
|---|---|
void |
add(long timestamp,
V object)
Adds element to this time-series collection
by specified
timestamp. |
void |
add(long timestamp,
V object,
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.
|
Collection<TimeSeriesEntry<V>> |
entryRange(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.
|
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.
|
Long |
firstTimestamp()
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. |
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.
|
Long |
lastTimestamp()
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. |
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. |
Collection<V> |
range(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.
|
boolean |
remove(long timestamp)
Removes object by specified
timestamp. |
int |
removeRange(long startTimestamp,
long endTimestamp)
Removes values within timestamp range.
|
int |
size()
Returns size of this set.
|
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.
|
clearExpire, expire, expireAt, expireAt, remainTimeToLiveaddListener, copy, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlinkforEach, iterator, spliteratoraddAllAsync, addAllAsync, addAsync, addAsync, entryRangeAsync, entryRangeReversedAsync, firstAsync, firstAsync, firstTimestampAsync, getAsync, lastAsync, lastAsync, lastTimestampAsync, pollFirstAsync, pollFirstAsync, pollLastAsync, pollLastAsync, rangeAsync, rangeReversedAsync, removeAsync, removeRangeAsync, sizeAsyncclearExpireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsyncaddListenerAsync, copyAsync, deleteAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsyncdestroyvoid add(long timestamp,
V object)
timestamp.timestamp - - object timestampobject - - object itselfvoid addAll(Map<Long,V> objects)
objects - - map of elements to addvoid add(long timestamp,
V object,
long timeToLive,
TimeUnit timeUnit)
timestamp.timestamp - - object timestampobject - - object itselftimeToLive - - time to live intervaltimeUnit - - unit of time to live intervalvoid addAll(Map<Long,V> objects, long timeToLive, TimeUnit timeUnit)
objects - - map of elements to addtimeToLive - - time to live intervaltimeUnit - - unit of time to live intervalint size()
V get(long timestamp)
timestamp or null if it doesn't exist.timestamp - - object timestampboolean remove(long timestamp)
timestamp.timestamp - - object timestamptrue if an element was removed as a result of this callCollection<V> pollFirst(int count)
null if this time-series collection is empty.count - - elements amountnull if this time-series collection is emptyCollection<V> pollLast(int count)
null if this time-series collection is empty.count - - elements amountnull if this time-series collection is emptyV pollFirst()
null if this time-series collection is empty.null if this time-series collection is emptyV pollLast()
null if this time-series collection is empty.null if this time-series collection is emptyV last()
null if this time-series collection is empty.null if this time-series collection is emptyV first()
null if this time-series collection is empty.null if this time-series collection is emptyLong firstTimestamp()
null if this time-series collection is empty.null if this time-series collection is emptyLong lastTimestamp()
null if this time-series collection is empty.null if this time-series collection is emptyCollection<V> last(int count)
count - - elements amountCollection<V> first(int count)
count - - elements amountint removeRange(long startTimestamp,
long endTimestamp)
startTimestamp - - start timestampendTimestamp - - end timestampCollection<V> range(long startTimestamp, long endTimestamp)
startTimestamp - - start timestampendTimestamp - - end timestampCollection<V> rangeReversed(long startTimestamp, long endTimestamp)
startTimestamp - - start timestampendTimestamp - - end timestampCollection<TimeSeriesEntry<V>> entryRange(long startTimestamp, long endTimestamp)
startTimestamp - - start timestampendTimestamp - - end timestampCollection<TimeSeriesEntry<V>> entryRangeReversed(long startTimestamp, long endTimestamp)
startTimestamp - - start timestampendTimestamp - - end timestampStream<V> stream()
Stream<V> stream(int count)
count param.count - - size of elements batchCopyright © 2014–2020 Redisson. All rights reserved.