Package org.redisson

Class RedissonTimeSeries<V,L>

java.lang.Object
org.redisson.RedissonObject
org.redisson.RedissonTimeSeries<V,L>
All Implemented Interfaces:
Iterable<V>, RDestroyable, RExpirable, RExpirableAsync, RObject, RObjectAsync, RTimeSeries<V,L>, RTimeSeriesAsync<V,L>

public class RedissonTimeSeries<V,L> extends RedissonObject implements RTimeSeries<V,L>
Author:
Nikita Koksharov
  • Constructor Details

  • Method Details

    • add

      public void add(long timestamp, V value)
      Description copied from interface: RTimeSeries
      Adds element to this time-series collection by specified timestamp.
      Specified by:
      add in interface RTimeSeries<V,L>
      Parameters:
      timestamp - object timestamp
      value - object itself
    • addAsync

      public RFuture<Void> addAsync(long timestamp, V object)
      Description copied from interface: RTimeSeriesAsync
      Adds element to this time-series collection by specified timestamp.
      Specified by:
      addAsync in interface RTimeSeriesAsync<V,L>
      Parameters:
      timestamp - object timestamp
      object - object itself
      Returns:
      void
    • add

      public void add(long timestamp, V object, L label)
      Description copied from interface: RTimeSeries
      Adds element with label to this time-series collection by specified timestamp.
      Specified by:
      add in interface RTimeSeries<V,L>
      Parameters:
      timestamp - object timestamp
      object - object itself
      label - object label
    • addAsync

      public RFuture<Void> addAsync(long timestamp, V object, L label)
      Description copied from interface: RTimeSeriesAsync
      Adds element with label to this time-series collection by specified timestamp.
      Specified by:
      addAsync in interface RTimeSeriesAsync<V,L>
      Parameters:
      timestamp - object timestamp
      object - object itself
      label - object label
    • addAll

      public void addAll(Map<Long,V> objects)
      Description copied from interface: RTimeSeries
      Adds all elements contained in the specified map to this time-series collection. Map contains of timestamp mapped by object.
      Specified by:
      addAll in interface RTimeSeries<V,L>
      Parameters:
      objects - - map of elements to add
    • add

      public void add(long timestamp, V value, long timeToLive, TimeUnit timeUnit)
      Description copied from interface: RTimeSeries
      Adds element to this time-series collection by specified timestamp.
      Specified by:
      add in interface RTimeSeries<V,L>
      Parameters:
      timestamp - - object timestamp
      value - - object itself
      timeToLive - - time to live interval
      timeUnit - - unit of time to live interval
    • addAsync

      public RFuture<Void> addAsync(long timestamp, V object, long timeToLive, TimeUnit timeUnit)
      Description copied from interface: RTimeSeriesAsync
      Adds element to this time-series collection by specified timestamp.
      Specified by:
      addAsync in interface RTimeSeriesAsync<V,L>
      Parameters:
      timestamp - - object timestamp
      object - - object itself
      timeToLive - - time to live interval
      timeUnit - - unit of time to live interval
      Returns:
      void
    • add

      public void add(long timestamp, V object, L label, Duration timeToLive)
      Description copied from interface: RTimeSeries
      Adds element with label to this time-series collection by specified timestamp.
      Specified by:
      add in interface RTimeSeries<V,L>
      Parameters:
      timestamp - object timestamp
      object - object itself
      label - object label
      timeToLive - time to live interval
    • addAsync

      public RFuture<Void> addAsync(long timestamp, V object, L label, Duration timeToLive)
      Description copied from interface: RTimeSeriesAsync
      Adds element with label to this time-series collection by specified timestamp.
      Specified by:
      addAsync in interface RTimeSeriesAsync<V,L>
      Parameters:
      timestamp - object timestamp
      object - object itself
      label - object label
      timeToLive - time to live interval
      Returns:
      void
    • addAll

      public void addAll(Map<Long,V> objects, long timeToLive, TimeUnit timeUnit)
      Description copied from interface: RTimeSeries
      Adds all elements contained in the specified map to this time-series collection. Map contains of timestamp mapped by object.
      Specified by:
      addAll in interface RTimeSeries<V,L>
      Parameters:
      objects - - map of elements to add
      timeToLive - - time to live interval
      timeUnit - - unit of time to live interval
    • addAllAsync

      public RFuture<Void> addAllAsync(Map<Long,V> objects)
      Description copied from interface: RTimeSeriesAsync
      Adds all elements contained in the specified map to this time-series collection. Map contains of timestamp mapped by object.
      Specified by:
      addAllAsync in interface RTimeSeriesAsync<V,L>
      Parameters:
      objects - - map of elements to add
      Returns:
      void
    • addAllAsync

      public RFuture<Void> addAllAsync(Map<Long,V> objects, long timeToLive, TimeUnit timeUnit)
      Description copied from interface: RTimeSeriesAsync
      Adds all elements contained in the specified map to this time-series collection. Map contains of timestamp mapped by object.
      Specified by:
      addAllAsync in interface RTimeSeriesAsync<V,L>
      Parameters:
      objects - - map of elements to add
      timeToLive - - time to live interval
      timeUnit - - unit of time to live interval
      Returns:
      void
    • addAll

      public void addAll(Collection<TimeSeriesEntry<V,L>> entries)
      Description copied from interface: RTimeSeries
      Adds all entries collection to this time-series collection.
      Specified by:
      addAll in interface RTimeSeries<V,L>
      Parameters:
      entries - collection of time series entries
    • addAllAsync

      public RFuture<Void> addAllAsync(Collection<TimeSeriesEntry<V,L>> entries)
      Description copied from interface: RTimeSeriesAsync
      Adds all entries collection to this time-series collection.
      Specified by:
      addAllAsync in interface RTimeSeriesAsync<V,L>
      Parameters:
      entries - collection of time series entries
      Returns:
      void
    • addAll

      public void addAll(Collection<TimeSeriesEntry<V,L>> entries, Duration timeToLive)
      Description copied from interface: RTimeSeries
      Adds all time series entries collection to this time-series collection. Specified time to live interval applied to all entries defined in collection.
      Specified by:
      addAll in interface RTimeSeries<V,L>
      Parameters:
      entries - collection of time series entries
      timeToLive - time to live interval
    • addAllAsync

      public RFuture<Void> addAllAsync(Collection<TimeSeriesEntry<V,L>> entries, Duration timeToLive)
      Description copied from interface: RTimeSeriesAsync
      Adds all time series entries collection to this time-series collection. Specified time to live interval applied to all entries defined in collection.
      Specified by:
      addAllAsync in interface RTimeSeriesAsync<V,L>
      Parameters:
      entries - collection of time series entries
      timeToLive - time to live interval
      Returns:
      void
    • size

      public int size()
      Description copied from interface: RTimeSeries
      Returns size of this set.
      Specified by:
      size in interface RTimeSeries<V,L>
      Returns:
      size
    • sizeAsync

      public RFuture<Integer> sizeAsync()
      Description copied from interface: RTimeSeriesAsync
      Returns size of this set.
      Specified by:
      sizeAsync in interface RTimeSeriesAsync<V,L>
      Returns:
      size
    • get

      public V get(long timestamp)
      Description copied from interface: RTimeSeries
      Returns object by specified timestamp or null if it doesn't exist.
      Specified by:
      get in interface RTimeSeries<V,L>
      Parameters:
      timestamp - - object timestamp
      Returns:
      object
    • getAsync

      public RFuture<V> getAsync(long timestamp)
      Description copied from interface: RTimeSeriesAsync
      Returns object by specified timestamp or null if it doesn't exist.
      Specified by:
      getAsync in interface RTimeSeriesAsync<V,L>
      Parameters:
      timestamp - - object timestamp
      Returns:
      object
    • getEntry

      public TimeSeriesEntry<V,L> getEntry(long timestamp)
      Description copied from interface: RTimeSeries
      Returns time series entry by specified timestamp or null if it doesn't exist.
      Specified by:
      getEntry in interface RTimeSeries<V,L>
      Parameters:
      timestamp - object timestamp
      Returns:
      time series entry
    • getEntryAsync

      public RFuture<TimeSeriesEntry<V,L>> getEntryAsync(long timestamp)
      Description copied from interface: RTimeSeriesAsync
      Returns time series entry by specified timestamp or null if it doesn't exist.
      Specified by:
      getEntryAsync in interface RTimeSeriesAsync<V,L>
      Parameters:
      timestamp - object timestamp
      Returns:
      time series entry
    • remove

      public boolean remove(long timestamp)
      Description copied from interface: RTimeSeries
      Removes object by specified timestamp.
      Specified by:
      remove in interface RTimeSeries<V,L>
      Parameters:
      timestamp - - object timestamp
      Returns:
      true if an element was removed as a result of this call
    • removeAsync

      public RFuture<Boolean> removeAsync(long timestamp)
      Description copied from interface: RTimeSeriesAsync
      Removes object by specified timestamp.
      Specified by:
      removeAsync in interface RTimeSeriesAsync<V,L>
      Parameters:
      timestamp - - object timestamp
      Returns:
      true if an element was removed as a result of this call
    • getAndRemove

      public V getAndRemove(long timestamp)
      Description copied from interface: RTimeSeries
      Removes and returns object by specified timestamp.
      Specified by:
      getAndRemove in interface RTimeSeries<V,L>
      Parameters:
      timestamp - - object timestamp
      Returns:
      object or null if it doesn't exist
    • getAndRemoveAsync

      public RFuture<V> getAndRemoveAsync(long timestamp)
      Description copied from interface: RTimeSeriesAsync
      Removes and returns object by specified timestamp.
      Specified by:
      getAndRemoveAsync in interface RTimeSeriesAsync<V,L>
      Parameters:
      timestamp - - object timestamp
      Returns:
      object or null if it doesn't exist
    • getAndRemoveEntry

      public TimeSeriesEntry<V,L> getAndRemoveEntry(long timestamp)
      Description copied from interface: RTimeSeries
      Removes and returns entry by specified timestamp.
      Specified by:
      getAndRemoveEntry in interface RTimeSeries<V,L>
      Parameters:
      timestamp - - object timestamp
      Returns:
      entry or null if it doesn't exist
    • getAndRemoveEntryAsync

      public RFuture<TimeSeriesEntry<V,L>> getAndRemoveEntryAsync(long timestamp)
      Description copied from interface: RTimeSeriesAsync
      Removes and returns entry by specified timestamp.
      Specified by:
      getAndRemoveEntryAsync in interface RTimeSeriesAsync<V,L>
      Parameters:
      timestamp - - object timestamp
      Returns:
      entry or null if it doesn't exist
    • last

      public V last()
      Description copied from interface: RTimeSeries
      Returns the tail element or null if this time-series collection is empty.
      Specified by:
      last in interface RTimeSeries<V,L>
      Returns:
      the tail element or null if this time-series collection is empty
    • lastAsync

      public RFuture<V> lastAsync()
      Description copied from interface: RTimeSeriesAsync
      Returns the tail element or null if this time-series collection is empty.
      Specified by:
      lastAsync in interface RTimeSeriesAsync<V,L>
      Returns:
      the tail element or null if this time-series collection is empty
    • lastEntry

      public TimeSeriesEntry<V,L> lastEntry()
      Description copied from interface: RTimeSeries
      Returns the tail entry or null if this time-series collection is empty.
      Specified by:
      lastEntry in interface RTimeSeries<V,L>
      Returns:
      the tail entry or null if this time-series collection is empty
    • lastEntryAsync

      public RFuture<TimeSeriesEntry<V,L>> lastEntryAsync()
      Description copied from interface: RTimeSeriesAsync
      Returns the tail entry or null if this time-series collection is empty.
      Specified by:
      lastEntryAsync in interface RTimeSeriesAsync<V,L>
      Returns:
      the tail entry or null if this time-series collection is empty
    • lastAsync

      public RFuture<Collection<V>> lastAsync(int count)
      Description copied from interface: RTimeSeriesAsync
      Returns the tail elements of this time-series collection.
      Specified by:
      lastAsync in interface RTimeSeriesAsync<V,L>
      Parameters:
      count - - elements amount
      Returns:
      the tail elements
    • first

      public V first()
      Description copied from interface: RTimeSeries
      Returns the head element or null if this time-series collection is empty.
      Specified by:
      first in interface RTimeSeries<V,L>
      Returns:
      the head element or null if this time-series collection is empty
    • firstAsync

      public RFuture<V> firstAsync()
      Description copied from interface: RTimeSeriesAsync
      Returns the head element or null if this time-series collection is empty.
      Specified by:
      firstAsync in interface RTimeSeriesAsync<V,L>
      Returns:
      the head element or null if this time-series collection is empty
    • firstEntry

      public TimeSeriesEntry<V,L> firstEntry()
      Description copied from interface: RTimeSeries
      Returns the head entry or null if this time-series collection is empty.
      Specified by:
      firstEntry in interface RTimeSeries<V,L>
      Returns:
      the head entry or null if this time-series collection is empty
    • firstEntryAsync

      public RFuture<TimeSeriesEntry<V,L>> firstEntryAsync()
      Description copied from interface: RTimeSeriesAsync
      Returns the head entry or null if this time-series collection is empty.
      Specified by:
      firstEntryAsync in interface RTimeSeriesAsync<V,L>
      Returns:
      the head entry or null if this time-series collection is empty
    • firstAsync

      public RFuture<Collection<V>> firstAsync(int count)
      Description copied from interface: RTimeSeriesAsync
      Returns the head elements of this time-series collection.
      Specified by:
      firstAsync in interface RTimeSeriesAsync<V,L>
      Parameters:
      count - - elements amount
      Returns:
      the head elements
    • first

      public Collection<V> first(int count)
      Description copied from interface: RTimeSeries
      Returns the head elements of this time-series collection.
      Specified by:
      first in interface RTimeSeries<V,L>
      Parameters:
      count - - elements amount
      Returns:
      the head elements
    • firstEntries

      public Collection<TimeSeriesEntry<V,L>> firstEntries(int count)
      Description copied from interface: RTimeSeries
      Returns the head entries of this time-series collection.
      Specified by:
      firstEntries in interface RTimeSeries<V,L>
      Parameters:
      count - - entries amount
      Returns:
      the head entries
    • firstEntriesAsync

      public RFuture<Collection<TimeSeriesEntry<V,L>>> firstEntriesAsync(int count)
      Description copied from interface: RTimeSeriesAsync
      Returns the head entries of this time-series collection.
      Specified by:
      firstEntriesAsync in interface RTimeSeriesAsync<V,L>
      Parameters:
      count - - entries amount
      Returns:
      the head entries
    • last

      public Collection<V> last(int count)
      Description copied from interface: RTimeSeries
      Returns the tail elements of this time-series collection.
      Specified by:
      last in interface RTimeSeries<V,L>
      Parameters:
      count - - elements amount
      Returns:
      the tail elements
    • lastEntries

      public Collection<TimeSeriesEntry<V,L>> lastEntries(int count)
      Description copied from interface: RTimeSeries
      Returns the tail entries of this time-series collection.
      Specified by:
      lastEntries in interface RTimeSeries<V,L>
      Parameters:
      count - - entries amount
      Returns:
      the tail entries
    • lastEntriesAsync

      public RFuture<Collection<TimeSeriesEntry<V,L>>> lastEntriesAsync(int count)
      Description copied from interface: RTimeSeriesAsync
      Returns the tail entries of this time-series collection.
      Specified by:
      lastEntriesAsync in interface RTimeSeriesAsync<V,L>
      Parameters:
      count - - entries amount
      Returns:
      the tail entries
    • firstTimestamp

      public Long firstTimestamp()
      Description copied from interface: RTimeSeries
      Returns timestamp of the head timestamp or null if this time-series collection is empty.
      Specified by:
      firstTimestamp in interface RTimeSeries<V,L>
      Returns:
      timestamp or null if this time-series collection is empty
    • firstTimestampAsync

      public RFuture<Long> firstTimestampAsync()
      Description copied from interface: RTimeSeriesAsync
      Returns timestamp of the head timestamp or null if this time-series collection is empty.
      Specified by:
      firstTimestampAsync in interface RTimeSeriesAsync<V,L>
      Returns:
      timestamp or null if this time-series collection is empty
    • lastTimestamp

      public Long lastTimestamp()
      Description copied from interface: RTimeSeries
      Returns timestamp of the tail element or null if this time-series collection is empty.
      Specified by:
      lastTimestamp in interface RTimeSeries<V,L>
      Returns:
      timestamp or null if this time-series collection is empty
    • lastTimestampAsync

      public RFuture<Long> lastTimestampAsync()
      Description copied from interface: RTimeSeriesAsync
      Returns timestamp of the tail element or null if this time-series collection is empty.
      Specified by:
      lastTimestampAsync in interface RTimeSeriesAsync<V,L>
      Returns:
      timestamp or null if this time-series collection is empty
    • removeRange

      public int removeRange(long startTimestamp, long endTimestamp)
      Description copied from interface: RTimeSeries
      Removes values within timestamp range. Including boundary values.
      Specified by:
      removeRange in interface RTimeSeries<V,L>
      Parameters:
      startTimestamp - - start timestamp
      endTimestamp - - end timestamp
      Returns:
      number of removed elements
    • removeRangeAsync

      public RFuture<Integer> removeRangeAsync(long startTimestamp, long endTimestamp)
      Description copied from interface: RTimeSeriesAsync
      Removes values within timestamp range. Including boundary values.
      Specified by:
      removeRangeAsync in interface RTimeSeriesAsync<V,L>
      Parameters:
      startTimestamp - - start timestamp
      endTimestamp - - end timestamp
      Returns:
      number of removed elements
    • range

      public Collection<V> range(long startTimestamp, long endTimestamp, int limit)
      Description copied from interface: RTimeSeries
      Returns ordered elements of this time-series collection within timestamp range. Including boundary values.
      Specified by:
      range in interface RTimeSeries<V,L>
      Parameters:
      startTimestamp - start timestamp
      endTimestamp - end timestamp
      limit - result size limit
      Returns:
      elements collection
    • range

      public Collection<V> range(long startTimestamp, long endTimestamp)
      Description copied from interface: RTimeSeries
      Returns ordered elements of this time-series collection within timestamp range. Including boundary values.
      Specified by:
      range in interface RTimeSeries<V,L>
      Parameters:
      startTimestamp - - start timestamp
      endTimestamp - - end timestamp
      Returns:
      elements collection
    • entryRange

      public Collection<TimeSeriesEntry<V,L>> entryRange(long startTimestamp, long endTimestamp)
      Description copied from interface: RTimeSeries
      Returns ordered entries of this time-series collection within timestamp range. Including boundary values.
      Specified by:
      entryRange in interface RTimeSeries<V,L>
      Parameters:
      startTimestamp - - start timestamp
      endTimestamp - - end timestamp
      Returns:
      elements collection
    • entryRangeReversed

      public Collection<TimeSeriesEntry<V,L>> entryRangeReversed(long startTimestamp, long endTimestamp)
      Description copied from interface: RTimeSeries
      Returns entries of this time-series collection in reverse order within timestamp range. Including boundary values.
      Specified by:
      entryRangeReversed in interface RTimeSeries<V,L>
      Parameters:
      startTimestamp - - start timestamp
      endTimestamp - - end timestamp
      Returns:
      elements collection
    • entryRangeReversedAsync

      public RFuture<Collection<TimeSeriesEntry<V,L>>> entryRangeReversedAsync(long startTimestamp, long endTimestamp)
      Description copied from interface: RTimeSeriesAsync
      Returns entries of this time-series collection in reverse order within timestamp range. Including boundary values.
      Specified by:
      entryRangeReversedAsync in interface RTimeSeriesAsync<V,L>
      Parameters:
      startTimestamp - - start timestamp
      endTimestamp - - end timestamp
      Returns:
      elements collection
    • entryRangeAsync

      public RFuture<Collection<TimeSeriesEntry<V,L>>> entryRangeAsync(long startTimestamp, long endTimestamp)
      Description copied from interface: RTimeSeriesAsync
      Returns ordered entries of this time-series collection within timestamp range. Including boundary values.
      Specified by:
      entryRangeAsync in interface RTimeSeriesAsync<V,L>
      Parameters:
      startTimestamp - - start timestamp
      endTimestamp - - end timestamp
      Returns:
      elements collection
    • rangeReversed

      public Collection<V> rangeReversed(long startTimestamp, long endTimestamp, int limit)
      Description copied from interface: RTimeSeries
      Returns elements of this time-series collection in reverse order within timestamp range. Including boundary values.
      Specified by:
      rangeReversed in interface RTimeSeries<V,L>
      Parameters:
      startTimestamp - start timestamp
      endTimestamp - end timestamp
      limit - result size limit
      Returns:
      elements collection
    • rangeAsync

      public RFuture<Collection<V>> rangeAsync(long startTimestamp, long endTimestamp)
      Description copied from interface: RTimeSeriesAsync
      Returns ordered elements of this time-series collection within timestamp range. Including boundary values.
      Specified by:
      rangeAsync in interface RTimeSeriesAsync<V,L>
      Parameters:
      startTimestamp - - start timestamp
      endTimestamp - - end timestamp
      Returns:
      elements collection
    • rangeAsync

      public RFuture<Collection<V>> rangeAsync(long startTimestamp, long endTimestamp, int limit)
      Description copied from interface: RTimeSeriesAsync
      Returns ordered elements of this time-series collection within timestamp range. Including boundary values.
      Specified by:
      rangeAsync in interface RTimeSeriesAsync<V,L>
      Parameters:
      startTimestamp - start timestamp
      endTimestamp - end timestamp
      limit - result size limit
      Returns:
      elements collection
    • rangeReversed

      public Collection<V> rangeReversed(long startTimestamp, long endTimestamp)
      Description copied from interface: RTimeSeries
      Returns elements of this time-series collection in reverse order within timestamp range. Including boundary values.
      Specified by:
      rangeReversed in interface RTimeSeries<V,L>
      Parameters:
      startTimestamp - - start timestamp
      endTimestamp - - end timestamp
      Returns:
      elements collection
    • rangeReversedAsync

      public RFuture<Collection<V>> rangeReversedAsync(long startTimestamp, long endTimestamp)
      Description copied from interface: RTimeSeriesAsync
      Returns elements of this time-series collection in reverse order within timestamp range. Including boundary values.
      Specified by:
      rangeReversedAsync in interface RTimeSeriesAsync<V,L>
      Parameters:
      startTimestamp - - start timestamp
      endTimestamp - - end timestamp
      Returns:
      elements collection
    • rangeReversedAsync

      public RFuture<Collection<V>> rangeReversedAsync(long startTimestamp, long endTimestamp, int limit)
      Description copied from interface: RTimeSeriesAsync
      Returns elements of this time-series collection in reverse order within timestamp range. Including boundary values.
      Specified by:
      rangeReversedAsync in interface RTimeSeriesAsync<V,L>
      Parameters:
      startTimestamp - start timestamp
      endTimestamp - end timestamp
      limit - result size limit
      Returns:
      elements collection
    • entryRange

      public Collection<TimeSeriesEntry<V,L>> entryRange(long startTimestamp, long endTimestamp, int limit)
      Description copied from interface: RTimeSeries
      Returns ordered entries of this time-series collection within timestamp range. Including boundary values.
      Specified by:
      entryRange in interface RTimeSeries<V,L>
      Parameters:
      startTimestamp - start timestamp
      endTimestamp - end timestamp
      limit - result size limit
      Returns:
      elements collection
    • entryRangeAsync

      public RFuture<Collection<TimeSeriesEntry<V,L>>> entryRangeAsync(long startTimestamp, long endTimestamp, int limit)
      Description copied from interface: RTimeSeriesAsync
      Returns ordered entries of this time-series collection within timestamp range. Including boundary values.
      Specified by:
      entryRangeAsync in interface RTimeSeriesAsync<V,L>
      Parameters:
      startTimestamp - start timestamp
      endTimestamp - end timestamp
      limit - result size limit
      Returns:
      elements collection
    • entryRangeReversed

      public Collection<TimeSeriesEntry<V,L>> entryRangeReversed(long startTimestamp, long endTimestamp, int limit)
      Description copied from interface: RTimeSeries
      Returns entries of this time-series collection in reverse order within timestamp range. Including boundary values.
      Specified by:
      entryRangeReversed in interface RTimeSeries<V,L>
      Parameters:
      startTimestamp - start timestamp
      endTimestamp - end timestamp
      limit - result size limit
      Returns:
      elements collection
    • entryRangeReversedAsync

      public RFuture<Collection<TimeSeriesEntry<V,L>>> entryRangeReversedAsync(long startTimestamp, long endTimestamp, int limit)
      Description copied from interface: RTimeSeriesAsync
      Returns entries of this time-series collection in reverse order within timestamp range. Including boundary values.
      Specified by:
      entryRangeReversedAsync in interface RTimeSeriesAsync<V,L>
      Parameters:
      startTimestamp - start timestamp
      endTimestamp - end timestamp
      limit - result size limit
      Returns:
      elements collection
    • pollFirst

      public Collection<V> pollFirst(int count)
      Description copied from interface: RTimeSeries
      Removes and returns the head elements
      Specified by:
      pollFirst in interface RTimeSeries<V,L>
      Parameters:
      count - - elements amount
      Returns:
      collection of head elements
    • pollLast

      public Collection<V> pollLast(int count)
      Description copied from interface: RTimeSeries
      Removes and returns the tail elements or null if this time-series collection is empty.
      Specified by:
      pollLast in interface RTimeSeries<V,L>
      Parameters:
      count - - elements amount
      Returns:
      the tail element or null if this time-series collection is empty
    • pollFirstAsync

      public RFuture<Collection<V>> pollFirstAsync(int count)
      Description copied from interface: RTimeSeriesAsync
      Removes and returns the head elements
      Specified by:
      pollFirstAsync in interface RTimeSeriesAsync<V,L>
      Parameters:
      count - - elements amount
      Returns:
      collection of head elements
    • pollLastAsync

      public RFuture<Collection<V>> pollLastAsync(int count)
      Description copied from interface: RTimeSeriesAsync
      Removes and returns the tail elements or null if this time-series collection is empty.
      Specified by:
      pollLastAsync in interface RTimeSeriesAsync<V,L>
      Parameters:
      count - - elements amount
      Returns:
      the tail element or null if this time-series collection is empty
    • pollFirstEntries

      public Collection<TimeSeriesEntry<V,L>> pollFirstEntries(int count)
      Description copied from interface: RTimeSeries
      Removes and returns head entries
      Specified by:
      pollFirstEntries in interface RTimeSeries<V,L>
      Parameters:
      count - - entries amount
      Returns:
      collection of head entries
    • pollFirstEntriesAsync

      public RFuture<Collection<TimeSeriesEntry<V,L>>> pollFirstEntriesAsync(int count)
      Description copied from interface: RTimeSeriesAsync
      Removes and returns head entries
      Specified by:
      pollFirstEntriesAsync in interface RTimeSeriesAsync<V,L>
      Parameters:
      count - - entries amount
      Returns:
      collection of head entries
    • pollLastEntries

      public Collection<TimeSeriesEntry<V,L>> pollLastEntries(int count)
      Description copied from interface: RTimeSeries
      Removes and returns tail entries
      Specified by:
      pollLastEntries in interface RTimeSeries<V,L>
      Parameters:
      count - - entries amount
      Returns:
      collection of tail entries
    • pollLastEntriesAsync

      public RFuture<Collection<TimeSeriesEntry<V,L>>> pollLastEntriesAsync(int count)
      Description copied from interface: RTimeSeriesAsync
      Removes and returns tail entries
      Specified by:
      pollLastEntriesAsync in interface RTimeSeriesAsync<V,L>
      Parameters:
      count - - entries amount
      Returns:
      collection of tail entries
    • pollFirst

      public V pollFirst()
      Description copied from interface: RTimeSeries
      Removes and returns the head element or null if this time-series collection is empty.
      Specified by:
      pollFirst in interface RTimeSeries<V,L>
      Returns:
      the head element, or null if this time-series collection is empty
    • pollLast

      public V pollLast()
      Description copied from interface: RTimeSeries
      Removes and returns the tail element or null if this time-series collection is empty.
      Specified by:
      pollLast in interface RTimeSeries<V,L>
      Returns:
      the tail element or null if this time-series collection is empty
    • pollFirstAsync

      public RFuture<V> pollFirstAsync()
      Description copied from interface: RTimeSeriesAsync
      Removes and returns the head element or null if this time-series collection is empty.
      Specified by:
      pollFirstAsync in interface RTimeSeriesAsync<V,L>
      Returns:
      the head element, or null if this time-series collection is empty
    • pollLastAsync

      public RFuture<V> pollLastAsync()
      Description copied from interface: RTimeSeriesAsync
      Removes and returns the tail element or null if this time-series collection is empty.
      Specified by:
      pollLastAsync in interface RTimeSeriesAsync<V,L>
      Returns:
      the tail element or null if this time-series collection is empty
    • pollFirstEntry

      public TimeSeriesEntry<V,L> pollFirstEntry()
      Description copied from interface: RTimeSeries
      Removes and returns head entry or null if this time-series collection is empty.
      Specified by:
      pollFirstEntry in interface RTimeSeries<V,L>
      Returns:
      the head entry, or null if this time-series collection is empty
    • pollFirstEntryAsync

      public RFuture<TimeSeriesEntry<V,L>> pollFirstEntryAsync()
      Description copied from interface: RTimeSeriesAsync
      Removes and returns head entry or null if this time-series collection is empty.
      Specified by:
      pollFirstEntryAsync in interface RTimeSeriesAsync<V,L>
      Returns:
      the head entry, or null if this time-series collection is empty
    • pollLastEntry

      public TimeSeriesEntry<V,L> pollLastEntry()
      Description copied from interface: RTimeSeries
      Removes and returns the tail entry or null if this time-series collection is empty.
      Specified by:
      pollLastEntry in interface RTimeSeries<V,L>
      Returns:
      the tail entry or null if this time-series collection is empty
    • pollLastEntryAsync

      public RFuture<TimeSeriesEntry<V,L>> pollLastEntryAsync()
      Description copied from interface: RTimeSeriesAsync
      Removes and returns the tail entry or null if this time-series collection is empty.
      Specified by:
      pollLastEntryAsync in interface RTimeSeriesAsync<V,L>
      Returns:
      the tail entry or null if this time-series collection is empty
    • scanIterator

      public ListScanResult<Object> scanIterator(String name, RedisClient client, long startPos, int count)
    • scanIteratorAsync

      public RFuture<ListScanResult<Object>> scanIteratorAsync(String name, RedisClient client, long startPos, int count)
    • iterator

      public Iterator<V> iterator(int count)
      Description copied from interface: RTimeSeries
      Returns an iterator over elements in this time-series collection. Elements are loaded in batch. Batch size is defined by count param.
      Specified by:
      iterator in interface RTimeSeries<V,L>
      Parameters:
      count - - size of elements batch
      Returns:
      iterator
    • iterator

      public Iterator<V> iterator()
      Specified by:
      iterator in interface Iterable<V>
    • stream

      public Stream<V> stream()
      Description copied from interface: RTimeSeries
      Returns stream of elements in this time-series collection. Elements are loaded in batch. Batch size is 10.
      Specified by:
      stream in interface RTimeSeries<V,L>
      Returns:
      stream of elements
    • stream

      public Stream<V> stream(int count)
      Description copied from interface: RTimeSeries
      Returns stream of elements in this time-series collection. Elements are loaded in batch. Batch size is defined by count param.
      Specified by:
      stream in interface RTimeSeries<V,L>
      Parameters:
      count - - size of elements batch
      Returns:
      stream of elements
    • destroy

      public void destroy()
      Description copied from interface: RDestroyable
      Destroys object when it's not necessary anymore.
      Specified by:
      destroy in interface RDestroyable
    • deleteAsync

      public RFuture<Boolean> deleteAsync()
      Description copied from interface: RObjectAsync
      Delete object in async mode
      Specified by:
      deleteAsync in interface RObjectAsync
      Overrides:
      deleteAsync in class RedissonObject
      Returns:
      true if object was deleted false if not
    • expireAsync

      public RFuture<Boolean> expireAsync(long timeToLive, TimeUnit timeUnit, String param, String... keys)
    • expireAtAsync

      protected RFuture<Boolean> expireAtAsync(long timestamp, String param, String... keys)
    • clearExpireAsync

      public RFuture<Boolean> clearExpireAsync()
      Description copied from interface: RExpirableAsync
      Clear an expire timeout or expire date for object in async mode. Object will not be deleted.
      Specified by:
      clearExpireAsync in interface RExpirableAsync
      Returns:
      true if the timeout was cleared and false if not
    • sizeInMemoryAsync

      public RFuture<Long> sizeInMemoryAsync()
      Description copied from interface: RObjectAsync
      Returns bytes amount used by object in Redis memory.
      Specified by:
      sizeInMemoryAsync in interface RObjectAsync
      Overrides:
      sizeInMemoryAsync in class RedissonObject
      Returns:
      size in bytes
    • expire

      public boolean expire(long timeToLive, TimeUnit timeUnit)
      Description copied from interface: RExpirable
      Specified by:
      expire in interface RExpirable
      Parameters:
      timeToLive - - timeout before object will be deleted
      timeUnit - - timeout time unit
      Returns:
      true if the timeout was set and false if not
    • expireAsync

      public RFuture<Boolean> expireAsync(long timeToLive, TimeUnit timeUnit)
      Description copied from interface: RExpirableAsync
      Specified by:
      expireAsync in interface RExpirableAsync
      Parameters:
      timeToLive - - timeout before object will be deleted
      timeUnit - - timeout time unit
      Returns:
      true if the timeout was set and false if not
    • expireAt

      public boolean expireAt(long timestamp)
      Description copied from interface: RExpirable
      Specified by:
      expireAt in interface RExpirable
      Parameters:
      timestamp - - expire date in milliseconds (Unix timestamp)
      Returns:
      true if the timeout was set and false if not
    • expireAtAsync

      public RFuture<Boolean> expireAtAsync(long timestamp)
      Description copied from interface: RExpirableAsync
      Specified by:
      expireAtAsync in interface RExpirableAsync
      Parameters:
      timestamp - - expire date in milliseconds (Unix timestamp)
      Returns:
      true if the timeout was set and false if not
    • expire

      public boolean expire(Instant instant)
      Description copied from interface: RExpirable
      Sets an expiration date for this object. When expire date comes the key will automatically be deleted.
      Specified by:
      expire in interface RExpirable
      Parameters:
      instant - expire date
      Returns:
      true if the timeout was set and false if not
    • expireIfSet

      public boolean expireIfSet(Instant time)
      Description copied from interface: RExpirable
      Sets an expiration date for this object only if it has been already set. When expire date comes the object will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfSet in interface RExpirable
      Parameters:
      time - expire date
      Returns:
      true if the timeout was set and false if not
    • expireIfSetAsync

      public RFuture<Boolean> expireIfSetAsync(Instant time)
      Description copied from interface: RExpirableAsync
      Sets an expiration date for this object only if it has been already set. When expire date comes the object will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfSetAsync in interface RExpirableAsync
      Parameters:
      time - expire date
      Returns:
      true if the timeout was set and false if not
    • expireIfNotSet

      public boolean expireIfNotSet(Instant time)
      Description copied from interface: RExpirable
      Sets an expiration date for this object only if it hasn't been set before. When expire date comes the object will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfNotSet in interface RExpirable
      Parameters:
      time - expire date
      Returns:
      true if the timeout was set and false if not
    • expireIfNotSetAsync

      public RFuture<Boolean> expireIfNotSetAsync(Instant time)
      Description copied from interface: RExpirableAsync
      Sets an expiration date for this object only if it hasn't been set before. When expire date comes the object will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfNotSetAsync in interface RExpirableAsync
      Parameters:
      time - expire date
      Returns:
      true if the timeout was set and false if not
    • expireIfGreater

      public boolean expireIfGreater(Instant time)
      Description copied from interface: RExpirable
      Sets an expiration date for this object only if it's greater than expiration date set before. When expire date comes the object will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfGreater in interface RExpirable
      Parameters:
      time - expire date
      Returns:
      true if the timeout was set and false if not
    • expireIfGreaterAsync

      public RFuture<Boolean> expireIfGreaterAsync(Instant time)
      Description copied from interface: RExpirableAsync
      Sets an expiration date for this object only if it's greater than expiration date set before. When expire date comes the object will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfGreaterAsync in interface RExpirableAsync
      Parameters:
      time - expire date
      Returns:
      true if the timeout was set and false if not
    • expireIfLess

      public boolean expireIfLess(Instant time)
      Description copied from interface: RExpirable
      Sets an expiration date for this object only if it's less than expiration date set before. When expire date comes the object will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfLess in interface RExpirable
      Parameters:
      time - expire date
      Returns:
      true if the timeout was set and false if not
    • expireIfLessAsync

      public RFuture<Boolean> expireIfLessAsync(Instant time)
      Description copied from interface: RExpirableAsync
      Sets an expiration date for this object only if it's less than expiration date set before. When expire date comes the object will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfLessAsync in interface RExpirableAsync
      Parameters:
      time - expire date
      Returns:
      true if the timeout was set and false if not
    • expireAsync

      public RFuture<Boolean> expireAsync(Instant instant)
      Description copied from interface: RExpirableAsync
      Set an expire date for object. When expire date comes the key will automatically be deleted.
      Specified by:
      expireAsync in interface RExpirableAsync
      Parameters:
      instant - - expire date
      Returns:
      true if the timeout was set and false if not
    • expire

      public boolean expire(Duration duration)
      Description copied from interface: RExpirable
      Sets a timeout for this object. After the timeout has expired, the key will automatically be deleted.
      Specified by:
      expire in interface RExpirable
      Parameters:
      duration - timeout before object will be deleted
      Returns:
      true if the timeout was set and false if not
    • expireAsync

      public RFuture<Boolean> expireAsync(Duration duration)
      Description copied from interface: RExpirableAsync
      Set a timeout for object. After the timeout has expired, the key will automatically be deleted.
      Specified by:
      expireAsync in interface RExpirableAsync
      Parameters:
      duration - timeout before object will be deleted
      Returns:
      true if the timeout was set and false if not
    • expireAt

      public boolean expireAt(Date timestamp)
      Description copied from interface: RExpirable
      Specified by:
      expireAt in interface RExpirable
      Parameters:
      timestamp - - expire date
      Returns:
      true if the timeout was set and false if not
    • expireAtAsync

      public RFuture<Boolean> expireAtAsync(Date timestamp)
      Description copied from interface: RExpirableAsync
      Specified by:
      expireAtAsync in interface RExpirableAsync
      Parameters:
      timestamp - - expire date
      Returns:
      true if the timeout was set and false if not
    • expireIfSet

      public boolean expireIfSet(Duration duration)
      Description copied from interface: RExpirable
      Sets a timeout for this object only if it has been already set. After the timeout has expired, the key will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfSet in interface RExpirable
      Parameters:
      duration - timeout before object will be deleted
      Returns:
      true if the timeout was set and false if not
    • expireIfSetAsync

      public RFuture<Boolean> expireIfSetAsync(Duration duration)
      Description copied from interface: RExpirableAsync
      Sets a timeout for this object only if it has been already set. After the timeout has expired, the key will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfSetAsync in interface RExpirableAsync
      Parameters:
      duration - timeout before object will be deleted
      Returns:
      true if the timeout was set and false if not
    • expireIfNotSet

      public boolean expireIfNotSet(Duration duration)
      Description copied from interface: RExpirable
      Sets a timeout for this object only if it hasn't been set before. After the timeout has expired, the key will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfNotSet in interface RExpirable
      Parameters:
      duration - timeout before object will be deleted
      Returns:
      true if the timeout was set and false if not
    • expireIfNotSetAsync

      public RFuture<Boolean> expireIfNotSetAsync(Duration duration)
      Description copied from interface: RExpirableAsync
      Sets a timeout for this object only if it hasn't been set before. After the timeout has expired, the key will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfNotSetAsync in interface RExpirableAsync
      Parameters:
      duration - timeout before object will be deleted
      Returns:
      true if the timeout was set and false if not
    • expireIfGreater

      public boolean expireIfGreater(Duration duration)
      Description copied from interface: RExpirable
      Sets a timeout for this object only if it's greater than timeout set before. After the timeout has expired, the key will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfGreater in interface RExpirable
      Parameters:
      duration - timeout before object will be deleted
      Returns:
      true if the timeout was set and false if not
    • expireIfGreaterAsync

      public RFuture<Boolean> expireIfGreaterAsync(Duration duration)
      Description copied from interface: RExpirableAsync
      Sets a timeout for this object only if it's greater than timeout set before. After the timeout has expired, the key will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfGreaterAsync in interface RExpirableAsync
      Parameters:
      duration - timeout before object will be deleted
      Returns:
      true if the timeout was set and false if not
    • expireIfLess

      public boolean expireIfLess(Duration duration)
      Description copied from interface: RExpirable
      Sets a timeout for this object only if it's less than timeout set before. After the timeout has expired, the key will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfLess in interface RExpirable
      Parameters:
      duration - timeout before object will be deleted
      Returns:
      true if the timeout was set and false if not
    • expireIfLessAsync

      public RFuture<Boolean> expireIfLessAsync(Duration duration)
      Description copied from interface: RExpirableAsync
      Sets a timeout for this object only if it's less than timeout set before. After the timeout has expired, the key will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfLessAsync in interface RExpirableAsync
      Parameters:
      duration - timeout before object will be deleted
      Returns:
      true if the timeout was set and false if not
    • clearExpire

      public boolean clearExpire()
      Description copied from interface: RExpirable
      Clear an expire timeout or expire date for object.
      Specified by:
      clearExpire in interface RExpirable
      Returns:
      true if timeout was removed false if object does not exist or does not have an associated timeout
    • remainTimeToLive

      public long remainTimeToLive()
      Description copied from interface: RExpirable
      Remaining time to live of Redisson object that has a timeout
      Specified by:
      remainTimeToLive in interface RExpirable
      Returns:
      time in milliseconds -2 if the key does not exist. -1 if the key exists but has no associated expire.
    • remainTimeToLiveAsync

      public RFuture<Long> remainTimeToLiveAsync()
      Description copied from interface: RExpirableAsync
      Remaining time to live of Redisson object that has a timeout
      Specified by:
      remainTimeToLiveAsync in interface RExpirableAsync
      Returns:
      time in milliseconds -2 if the key does not exist. -1 if the key exists but has no associated expire.
    • getExpireTime

      public long getExpireTime()
      Description copied from interface: RExpirable
      Expiration time of Redisson object that has a timeout

      Requires Redis 7.0.0 and higher.

      Specified by:
      getExpireTime in interface RExpirable
      Returns:
      expiration time
    • getExpireTimeAsync

      public RFuture<Long> getExpireTimeAsync()
      Description copied from interface: RExpirableAsync
      Expiration time of Redisson object that has a timeout

      Requires Redis 7.0.0 and higher.

      Specified by:
      getExpireTimeAsync in interface RExpirableAsync
      Returns:
      expiration time
    • clearExpireAsync

      protected RFuture<Boolean> clearExpireAsync(String... keys)