Interface RTimeSeriesReactive<V,L>

Type Parameters:
V - value type
L - label type
All Superinterfaces:
RExpirableReactive, RObjectReactive

public interface RTimeSeriesReactive<V,L> extends RExpirableReactive
Reactive interface for Redis based time-series collection.
Author:
Nikita Koksharov
  • Method Details

    • iterator

      reactor.core.publisher.Flux<V> iterator()
      Returns iterator over collection elements
      Returns:
      iterator
    • add

      reactor.core.publisher.Mono<Void> add(long timestamp, V object)
      Adds element to this time-series collection by specified timestamp.
      Parameters:
      timestamp - object timestamp
      object - object itself
      Returns:
      void
    • add

      reactor.core.publisher.Mono<Void> add(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
      Returns:
      void
    • addAll

      reactor.core.publisher.Mono<Void> addAll(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
    • addAll

      reactor.core.publisher.Mono<Void> addAll(Collection<TimeSeriesEntry<V,L>> entries)
      Adds all entries collection to this time-series collection.
      Parameters:
      entries - collection of time series entries
      Returns:
      void
    • add

      @Deprecated reactor.core.publisher.Mono<Void> add(long timestamp, V object, long timeToLive, TimeUnit timeUnit)
      Deprecated.
      Parameters:
      timestamp - - object timestamp
      object - - object itself
      timeToLive - - time to live interval
      timeUnit - - unit of time to live interval
      Returns:
      void
    • add

      reactor.core.publisher.Mono<Void> add(long timestamp, V object, Duration timeToLive)
      Adds element to this time-series collection by specified timestamp.
      Parameters:
      timestamp - object timestamp
      object - object itself
      timeToLive - time to live interval
    • add

      reactor.core.publisher.Mono<Void> add(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
    • addAll

      @Deprecated reactor.core.publisher.Mono<Void> addAll(Map<Long,V> objects, long timeToLive, TimeUnit timeUnit)
      Deprecated.
      Parameters:
      objects - - map of elements to add
      timeToLive - - time to live interval
      timeUnit - - unit of time to live interval
      Returns:
      void
    • addAll

      reactor.core.publisher.Mono<Void> addAll(Map<Long,V> objects, Duration timeToLive)
      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
    • addAll

      reactor.core.publisher.Mono<Void> 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 entries
      timeToLive - time to live interval
      Returns:
      void
    • size

      reactor.core.publisher.Mono<Integer> size()
      Returns size of this set.
      Returns:
      size
    • get

      reactor.core.publisher.Mono<V> get(long timestamp)
      Returns object by specified timestamp or null if it doesn't exist.
      Parameters:
      timestamp - - object timestamp
      Returns:
      object
    • getEntry

      reactor.core.publisher.Mono<TimeSeriesEntry<V,L>> getEntry(long timestamp)
      Returns time series entry by specified timestamp or null if it doesn't exist.
      Parameters:
      timestamp - object timestamp
      Returns:
      time series entry
    • remove

      reactor.core.publisher.Mono<Boolean> remove(long timestamp)
      Removes object by specified timestamp.
      Parameters:
      timestamp - - object timestamp
      Returns:
      true if an element was removed as a result of this call
    • getAndRemove

      reactor.core.publisher.Mono<V> getAndRemove(long timestamp)
      Removes and returns object by specified timestamp.
      Parameters:
      timestamp - - object timestamp
      Returns:
      object or null if it doesn't exist
    • getAndRemoveEntry

      reactor.core.publisher.Mono<TimeSeriesEntry<V,L>> getAndRemoveEntry(long timestamp)
      Removes and returns entry by specified timestamp.
      Parameters:
      timestamp - - object timestamp
      Returns:
      entry or null if it doesn't exist
    • pollFirst

      reactor.core.publisher.Mono<Collection<V>> pollFirst(int count)
      Removes and returns the head elements or null 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

      reactor.core.publisher.Mono<Collection<TimeSeriesEntry<V,L>>> pollFirstEntries(int count)
      Removes and returns head entries
      Parameters:
      count - - entries amount
      Returns:
      collection of head entries
    • pollLast

      reactor.core.publisher.Mono<Collection<V>> pollLast(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
    • pollLastEntries

      reactor.core.publisher.Mono<Collection<TimeSeriesEntry<V,L>>> pollLastEntries(int count)
      Removes and returns tail entries
      Parameters:
      count - - entries amount
      Returns:
      collection of tail entries
    • pollFirst

      reactor.core.publisher.Mono<V> pollFirst()
      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
    • pollFirstEntry

      reactor.core.publisher.Mono<TimeSeriesEntry<V,L>> pollFirstEntry()
      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
    • pollLast

      reactor.core.publisher.Mono<V> pollLast()
      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
    • pollLastEntry

      reactor.core.publisher.Mono<TimeSeriesEntry<V,L>> pollLastEntry()
      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
    • last

      reactor.core.publisher.Mono<V> last()
      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
    • lastEntry

      reactor.core.publisher.Mono<TimeSeriesEntry<V,L>> lastEntry()
      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
    • first

      reactor.core.publisher.Mono<V> first()
      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
    • firstEntry

      reactor.core.publisher.Mono<TimeSeriesEntry<V,L>> firstEntry()
      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
    • firstTimestamp

      reactor.core.publisher.Mono<Long> firstTimestamp()
      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
    • lastTimestamp

      reactor.core.publisher.Mono<Long> lastTimestamp()
      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
    • last

      reactor.core.publisher.Mono<Collection<V>> last(int count)
      Returns the tail elements of this time-series collection.
      Parameters:
      count - - elements amount
      Returns:
      the tail elements
    • lastEntries

      reactor.core.publisher.Mono<Collection<TimeSeriesEntry<V,L>>> lastEntries(int count)
      Returns the tail entries of this time-series collection.
      Parameters:
      count - - entries amount
      Returns:
      the tail entries
    • first

      reactor.core.publisher.Mono<Collection<V>> first(int count)
      Returns the head elements of this time-series collection.
      Parameters:
      count - - elements amount
      Returns:
      the head elements
    • firstEntries

      reactor.core.publisher.Mono<Collection<TimeSeriesEntry<V,L>>> firstEntries(int count)
      Returns the head entries of this time-series collection.
      Parameters:
      count - - entries amount
      Returns:
      the head entries
    • removeRange

      reactor.core.publisher.Mono<Integer> removeRange(long startTimestamp, long endTimestamp)
      Removes values within timestamp range. Including boundary values.
      Parameters:
      startTimestamp - - start timestamp
      endTimestamp - - end timestamp
      Returns:
      number of removed elements
    • range

      reactor.core.publisher.Mono<Collection<V>> range(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
    • range

      reactor.core.publisher.Mono<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 timestamp
      endTimestamp - end timestamp
      limit - result size limit
      Returns:
      elements collection
    • rangeReversed

      reactor.core.publisher.Mono<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 timestamp
      endTimestamp - - end timestamp
      Returns:
      elements collection
    • rangeReversed

      reactor.core.publisher.Mono<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 timestamp
      endTimestamp - end timestamp
      limit - result size limit
      Returns:
      elements collection
    • entryRange

      reactor.core.publisher.Mono<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 timestamp
      endTimestamp - - end timestamp
      Returns:
      elements collection
    • entryRange

      reactor.core.publisher.Mono<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 timestamp
      endTimestamp - end timestamp
      limit - result size limit
      Returns:
      elements collection
    • entryRangeReversed

      reactor.core.publisher.Mono<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 timestamp
      endTimestamp - - end timestamp
      Returns:
      elements collection
    • entryRangeReversed

      reactor.core.publisher.Mono<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 timestamp
      endTimestamp - end timestamp
      limit - result size limit
      Returns:
      elements collection
    • addListener

      reactor.core.publisher.Mono<Integer> addListener(ObjectListener listener)
      Adds object event listener
      Specified by:
      addListener in interface RObjectReactive
      Parameters:
      listener - - object event listener
      Returns:
      listener id
      See Also: