Interface RTimeSeriesAsync<V,L>

Type Parameters:
V - value type
L - label type
All Superinterfaces:
RExpirableAsync, RObjectAsync
All Known Subinterfaces:
RTimeSeries<V,L>
All Known Implementing Classes:
RedissonTimeSeries

public interface RTimeSeriesAsync<V,L> extends RExpirableAsync
Async interface for Redis based time-series collection.
Author:
Nikita Koksharov
  • Method Details

    • addAsync

      RFuture<Void> addAsync(long timestamp, V object)
      Adds element to this time-series collection by specified timestamp.
      Parameters:
      timestamp - object timestamp
      object - object itself
      Returns:
      void
    • addAsync

      RFuture<Void> addAsync(long timestamp, V object, L label)
      Adds element with label to this time-series collection by specified timestamp.
      Parameters:
      timestamp - object timestamp
      object - object itself
      label - object label
    • 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
    • addAllAsync

      RFuture<Void> addAllAsync(Collection<TimeSeriesEntry<V,L>> entries)
      Adds all entries collection to this time-series collection.
      Parameters:
      entries - collection of time series entries
      Returns:
      void
    • addAsync

      RFuture<Void> addAsync(long timestamp, V object, long timeToLive, TimeUnit timeUnit)
      Adds element to this time-series collection by specified timestamp.
      Parameters:
      timestamp - - object timestamp
      object - - object itself
      timeToLive - - time to live interval
      timeUnit - - unit of time to live interval
      Returns:
      void
    • addAsync

      RFuture<Void> addAsync(long timestamp, V object, L label, Duration timeToLive)
      Adds element with label to this time-series collection by specified timestamp.
      Parameters:
      timestamp - object timestamp
      object - object itself
      label - object label
      timeToLive - 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 add
      timeToLive - - time to live interval
      timeUnit - - unit of time to live interval
      Returns:
      void
    • addAllAsync

      RFuture<Void> addAllAsync(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 entries
      timeToLive - time to live interval
      Returns:
      void
    • sizeAsync

      RFuture<Integer> sizeAsync()
      Returns size of this set.
      Returns:
      size
    • getAsync

      RFuture<V> getAsync(long timestamp)
      Returns object by specified timestamp or null if it doesn't exist.
      Parameters:
      timestamp - - object timestamp
      Returns:
      object
    • getEntryAsync

      RFuture<TimeSeriesEntry<V,L>> getEntryAsync(long timestamp)
      Returns time series entry by specified timestamp or null if it doesn't exist.
      Parameters:
      timestamp - object timestamp
      Returns:
      time series entry
    • removeAsync

      RFuture<Boolean> removeAsync(long timestamp)
      Removes object by specified timestamp.
      Parameters:
      timestamp - - object timestamp
      Returns:
      true if an element was removed as a result of this call
    • getAndRemoveAsync

      RFuture<V> getAndRemoveAsync(long timestamp)
      Removes and returns object by specified timestamp.
      Parameters:
      timestamp - - object timestamp
      Returns:
      object or null if it doesn't exist
    • getAndRemoveEntryAsync

      RFuture<TimeSeriesEntry<V,L>> getAndRemoveEntryAsync(long timestamp)
      Removes and returns entry by specified timestamp.
      Parameters:
      timestamp - - object timestamp
      Returns:
      entry or null if it doesn't exist
    • pollFirstAsync

      RFuture<Collection<V>> pollFirstAsync(int count)
      Removes and returns the head elements
      Parameters:
      count - - elements amount
      Returns:
      collection of head elements
    • pollFirstEntriesAsync

      RFuture<Collection<TimeSeriesEntry<V,L>>> pollFirstEntriesAsync(int count)
      Removes and returns head entries
      Parameters:
      count - - entries amount
      Returns:
      collection of head entries
    • pollLastAsync

      RFuture<Collection<V>> pollLastAsync(int count)
      Removes and returns the tail elements or null 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

      RFuture<Collection<TimeSeriesEntry<V,L>>> pollLastEntriesAsync(int count)
      Removes and returns tail entries
      Parameters:
      count - - entries amount
      Returns:
      collection of tail entries
    • pollFirstAsync

      RFuture<V> pollFirstAsync()
      Removes and returns the head element or null 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 or null if this time-series collection is empty.
      Returns:
      the head entry, or null if this time-series collection is empty
    • pollLastAsync

      RFuture<V> pollLastAsync()
      Removes and returns the tail element or null 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 or null if this time-series collection is empty.
      Returns:
      the tail entry or null if this time-series collection is empty
    • lastAsync

      RFuture<V> lastAsync()
      Returns the tail element or null 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 or null if this time-series collection is empty.
      Returns:
      the tail entry or null if this time-series collection is empty
    • firstAsync

      RFuture<V> firstAsync()
      Returns the head element or null 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 or null if this time-series collection is empty.
      Returns:
      the head entry or null if this time-series collection is empty
    • firstTimestampAsync

      RFuture<Long> firstTimestampAsync()
      Returns timestamp of the head timestamp or null 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 or null 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
    • lastEntriesAsync

      RFuture<Collection<TimeSeriesEntry<V,L>>> lastEntriesAsync(int count)
      Returns the tail entries of this time-series collection.
      Parameters:
      count - - entries amount
      Returns:
      the tail entries
    • firstAsync

      RFuture<Collection<V>> firstAsync(int count)
      Returns the head elements of this time-series collection.
      Parameters:
      count - - elements amount
      Returns:
      the head elements
    • firstEntriesAsync

      RFuture<Collection<TimeSeriesEntry<V,L>>> firstEntriesAsync(int count)
      Returns the head entries of this time-series collection.
      Parameters:
      count - - entries amount
      Returns:
      the head entries
    • removeRangeAsync

      RFuture<Integer> removeRangeAsync(long startTimestamp, long endTimestamp)
      Removes values within timestamp range. Including boundary values.
      Parameters:
      startTimestamp - - start timestamp
      endTimestamp - - 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 timestamp
      endTimestamp - - end timestamp
      Returns:
      elements collection
    • rangeAsync

      RFuture<Collection<V>> rangeAsync(long startTimestamp, long endTimestamp, int limit)
      Returns ordered elements of this time-series collection within timestamp range. Including boundary values.
      Parameters:
      startTimestamp - start timestamp
      endTimestamp - end timestamp
      limit - result size limit
      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 timestamp
      endTimestamp - - end timestamp
      Returns:
      elements collection
    • rangeReversedAsync

      RFuture<Collection<V>> rangeReversedAsync(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 timestamp
      endTimestamp - end timestamp
      limit - result size limit
      Returns:
      elements collection
    • entryRangeAsync

      RFuture<Collection<TimeSeriesEntry<V,L>>> entryRangeAsync(long startTimestamp, long endTimestamp)
      Returns ordered entries of this time-series collection within timestamp range. Including boundary values.
      Parameters:
      startTimestamp - - start timestamp
      endTimestamp - - 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 timestamp
      endTimestamp - end timestamp
      limit - 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 timestamp
      endTimestamp - - 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 timestamp
      endTimestamp - end timestamp
      limit - result size limit
      Returns:
      elements collection