Interface RTimeSeriesRx<V>

  • All Superinterfaces:
    RExpirableRx, RObjectRx

    public interface RTimeSeriesRx<V>
    extends RExpirableRx
    Rx interface for Redis based time-series collection.
    Author:
    Nikita Koksharov
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      io.reactivex.rxjava3.core.Completable add(long timestamp, V object)
      Adds element to this time-series collection by specified timestamp.
      io.reactivex.rxjava3.core.Completable add(long timestamp, V object, long timeToLive, TimeUnit timeUnit)
      Adds element to this time-series collection by specified timestamp.
      io.reactivex.rxjava3.core.Completable addAll(Map<Long,V> objects)
      Adds all elements contained in the specified map to this time-series collection.
      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.
      io.reactivex.rxjava3.core.Single<Collection<TimeSeriesEntry<V>>> entryRange(long startTimestamp, long endTimestamp)
      Returns ordered entries of this time-series collection within timestamp range.
      io.reactivex.rxjava3.core.Single<Collection<TimeSeriesEntry<V>>> entryRangeReversed(long startTimestamp, long endTimestamp)
      Returns entries of this time-series collection in reverse order within timestamp range.
      io.reactivex.rxjava3.core.Maybe<V> first()
      Returns the head element or null 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<Long> firstTimestamp()
      Returns timestamp of the head timestamp or null if this time-series collection is empty.
      io.reactivex.rxjava3.core.Maybe<V> get(long timestamp)
      Returns object by specified timestamp or null if it doesn't exist.
      io.reactivex.rxjava3.core.Flowable<V> iterator()
      Returns iterator over collection elements
      io.reactivex.rxjava3.core.Maybe<V> last()
      Returns the tail element or null 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<Long> lastTimestamp()
      Returns timestamp of the tail element or null if this time-series collection is empty.
      io.reactivex.rxjava3.core.Maybe<V> pollFirst()
      Removes and returns the head element or null if this time-series collection is empty.
      io.reactivex.rxjava3.core.Single<Collection<V>> pollFirst(int count)
      Removes and returns the head elements or null if this time-series collection is empty.
      io.reactivex.rxjava3.core.Maybe<V> pollLast()
      Removes and returns the tail element or null if this time-series collection is empty.
      io.reactivex.rxjava3.core.Single<Collection<V>> pollLast(int count)
      Removes and returns the tail elements or null 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>> rangeReversed(long startTimestamp, long endTimestamp)
      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 specified timestamp.
      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.
    • Method Detail

      • iterator

        io.reactivex.rxjava3.core.Flowable<V> iterator()
        Returns iterator over collection elements
        Returns:
        iterator
      • add

        io.reactivex.rxjava3.core.Completable add(long timestamp,
                                                  V object)
        Adds element to this time-series collection by specified timestamp.
        Parameters:
        timestamp - - object timestamp
        object - - object itself
        Returns:
        void
      • addAll

        io.reactivex.rxjava3.core.Completable 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
      • add

        io.reactivex.rxjava3.core.Completable add(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
      • 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 add
        timeToLive - - time to live interval
        timeUnit - - unit of time to live interval
        Returns:
        void
      • size

        io.reactivex.rxjava3.core.Single<Integer> size()
        Returns size of this set.
        Returns:
        size
      • get

        io.reactivex.rxjava3.core.Maybe<V> get(long timestamp)
        Returns object by specified timestamp or null if it doesn't exist.
        Parameters:
        timestamp - - object timestamp
        Returns:
        object
      • remove

        io.reactivex.rxjava3.core.Single<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
      • pollFirst

        io.reactivex.rxjava3.core.Single<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
      • pollLast

        io.reactivex.rxjava3.core.Single<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
      • pollFirst

        io.reactivex.rxjava3.core.Maybe<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
      • pollLast

        io.reactivex.rxjava3.core.Maybe<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
      • last

        io.reactivex.rxjava3.core.Maybe<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
      • first

        io.reactivex.rxjava3.core.Maybe<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
      • firstTimestamp

        io.reactivex.rxjava3.core.Single<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

        io.reactivex.rxjava3.core.Single<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

        io.reactivex.rxjava3.core.Single<Collection<V>> last(int count)
        Returns the tail elements of this time-series collection.
        Parameters:
        count - - elements amount
        Returns:
        the tail elements
      • first

        io.reactivex.rxjava3.core.Single<Collection<V>> first(int count)
        Returns the head elements of this time-series collection.
        Parameters:
        count - - elements amount
        Returns:
        the head elements
      • removeRange

        io.reactivex.rxjava3.core.Single<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

        io.reactivex.rxjava3.core.Single<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
      • 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 timestamp
        endTimestamp - - end timestamp
        Returns:
        elements collection
      • entryRange

        io.reactivex.rxjava3.core.Single<Collection<TimeSeriesEntry<V>>> 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
      • entryRangeReversed

        io.reactivex.rxjava3.core.Single<Collection<TimeSeriesEntry<V>>> 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