Interface RScoredSortedSetReactive<V>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      org.reactivestreams.Publisher<Boolean> add​(double score, V object)
      Adds element to this set, overrides previous score if it has been already added.
      org.reactivestreams.Publisher<Long> addAll​(Map<V,​Double> objects)  
      org.reactivestreams.Publisher<Integer> addAndGetRank​(double score, V object)
      Adds element to this set, overrides previous score if it has been already added.
      org.reactivestreams.Publisher<Integer> addAndGetRevRank​(double score, V object)
      Adds element to this set, overrides previous score if it has been already added.
      org.reactivestreams.Publisher<Double> addScore​(V object, Number value)  
      org.reactivestreams.Publisher<Integer> addScoreAndGetRank​(V object, Number value)
      Adds score to element and returns its rank
      org.reactivestreams.Publisher<Integer> addScoreAndGetRevRank​(V object, Number value)
      Adds score to element and returns its reverse rank
      org.reactivestreams.Publisher<Boolean> contains​(V o)  
      org.reactivestreams.Publisher<Boolean> containsAll​(Collection<?> c)  
      org.reactivestreams.Publisher<Long> count​(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
      Returns the number of elements with a score between startScore and endScore.
      org.reactivestreams.Publisher<Collection<ScoredEntry<V>>> entryRange​(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)  
      org.reactivestreams.Publisher<Collection<ScoredEntry<V>>> entryRange​(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)  
      org.reactivestreams.Publisher<Collection<ScoredEntry<V>>> entryRange​(int startIndex, int endIndex)  
      org.reactivestreams.Publisher<Collection<ScoredEntry<V>>> entryRangeReversed​(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)  
      org.reactivestreams.Publisher<Collection<ScoredEntry<V>>> entryRangeReversed​(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)  
      org.reactivestreams.Publisher<Collection<ScoredEntry<V>>> entryRangeReversed​(int startIndex, int endIndex)  
      org.reactivestreams.Publisher<V> first()
      Returns the head element or null if this sorted set is empty.
      org.reactivestreams.Publisher<Double> firstScore()
      Returns score of the head element or returns null if this sorted set is empty.
      org.reactivestreams.Publisher<Double> getScore​(V o)  
      org.reactivestreams.Publisher<Integer> intersection​(String... names)
      Intersect provided ScoredSortedSets and store result to current ScoredSortedSet
      org.reactivestreams.Publisher<Integer> intersection​(Map<String,​Double> nameWithWeight)
      Intersect provided ScoredSortedSets mapped to weight multiplier and store result to current ScoredSortedSet
      org.reactivestreams.Publisher<Integer> intersection​(RScoredSortedSet.Aggregate aggregate, String... names)
      Intersect provided ScoredSortedSets with defined aggregation method and store result to current ScoredSortedSet
      org.reactivestreams.Publisher<Integer> intersection​(RScoredSortedSet.Aggregate aggregate, Map<String,​Double> nameWithWeight)
      Intersect provided ScoredSortedSets mapped to weight multiplier with defined aggregation method and store result to current ScoredSortedSet
      org.reactivestreams.Publisher<V> iterator()  
      org.reactivestreams.Publisher<V> iterator​(int count)
      Returns an iterator over elements in this set.
      org.reactivestreams.Publisher<V> iterator​(String pattern)
      Returns an iterator over elements in this set.
      org.reactivestreams.Publisher<V> iterator​(String pattern, int count)
      Returns an iterator over elements in this set.
      org.reactivestreams.Publisher<V> last()
      Returns the tail element or null if this sorted set is empty.
      org.reactivestreams.Publisher<Double> lastScore()
      Returns score of the tail element or returns null if this sorted set is empty.
      org.reactivestreams.Publisher<V> pollFirst()
      Removes and returns the head element or null if this sorted set is empty.
      org.reactivestreams.Publisher<Collection<V>> pollFirst​(int count)
      Removes and returns the head elements or null if this sorted set is empty.
      org.reactivestreams.Publisher<V> pollFirst​(long timeout, TimeUnit unit)
      Removes and returns the head element or null if this sorted set is empty.
      org.reactivestreams.Publisher<V> pollFirstFromAny​(long timeout, TimeUnit unit, String... queueNames)
      Removes and returns first available head element of any sorted set, waiting up to the specified wait time if necessary for an element to become available in any of defined sorted sets including this one.
      org.reactivestreams.Publisher<V> pollLast()
      Removes and returns the tail element or null if this sorted set is empty.
      org.reactivestreams.Publisher<Collection<V>> pollLast​(int count)
      Removes and returns the tail elements or null if this sorted set is empty.
      org.reactivestreams.Publisher<V> pollLast​(long timeout, TimeUnit unit)
      Removes and returns the tail element or null if this sorted set is empty.
      org.reactivestreams.Publisher<V> pollLastFromAny​(long timeout, TimeUnit unit, String... queueNames)
      Removes and returns first available tail element of any sorted set, waiting up to the specified wait time if necessary for an element to become available in any of defined sorted sets including this one.
      org.reactivestreams.Publisher<Integer> rank​(V o)
      Returns rank of value, with the scores ordered from low to high.
      org.reactivestreams.Publisher<Collection<V>> readAll()
      Read all values at once.
      org.reactivestreams.Publisher<Boolean> remove​(V object)  
      org.reactivestreams.Publisher<Boolean> removeAll​(Collection<?> c)  
      org.reactivestreams.Publisher<Integer> removeRangeByRank​(int startIndex, int endIndex)  
      org.reactivestreams.Publisher<Integer> removeRangeByScore​(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)  
      org.reactivestreams.Publisher<Boolean> retainAll​(Collection<?> c)  
      org.reactivestreams.Publisher<Integer> revRank​(V o)
      Returns rank of value, with the scores ordered from high to low.
      org.reactivestreams.Publisher<Integer> size()  
      org.reactivestreams.Publisher<V> takeFirst()
      Removes and returns the head element waiting if necessary for an element to become available.
      org.reactivestreams.Publisher<V> takeLast()
      Removes and returns the tail element waiting if necessary for an element to become available.
      org.reactivestreams.Publisher<Boolean> tryAdd​(double score, V object)
      Adds element to this set only if has not been added before.
      org.reactivestreams.Publisher<Integer> union​(String... names)
      Union provided ScoredSortedSets and store result to current ScoredSortedSet
      org.reactivestreams.Publisher<Integer> union​(Map<String,​Double> nameWithWeight)
      Union provided ScoredSortedSets mapped to weight multiplier and store result to current ScoredSortedSet
      org.reactivestreams.Publisher<Integer> union​(RScoredSortedSet.Aggregate aggregate, String... names)
      Union provided ScoredSortedSets with defined aggregation method and store result to current ScoredSortedSet
      org.reactivestreams.Publisher<Integer> union​(RScoredSortedSet.Aggregate aggregate, Map<String,​Double> nameWithWeight)
      Union provided ScoredSortedSets mapped to weight multiplier with defined aggregation method and store result to current ScoredSortedSet
      org.reactivestreams.Publisher<Collection<V>> valueRange​(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)  
      org.reactivestreams.Publisher<Collection<V>> valueRange​(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)  
      org.reactivestreams.Publisher<Collection<V>> valueRange​(int startIndex, int endIndex)  
      org.reactivestreams.Publisher<Collection<V>> valueRangeReversed​(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive)
      Returns all values between startScore and endScore in reversed order.
      org.reactivestreams.Publisher<Collection<V>> valueRangeReversed​(double startScore, boolean startScoreInclusive, double endScore, boolean endScoreInclusive, int offset, int count)  
      org.reactivestreams.Publisher<Collection<V>> valueRangeReversed​(int startIndex, int endIndex)  
    • Method Detail

      • pollLastFromAny

        org.reactivestreams.Publisher<V> pollLastFromAny​(long timeout,
                                                         TimeUnit unit,
                                                         String... queueNames)
        Removes and returns first available tail element of any sorted set, waiting up to the specified wait time if necessary for an element to become available in any of defined sorted sets including this one.

        Requires Redis 5.0.0 and higher.

        Parameters:
        queueNames - - names of queue
        timeout - how long to wait before giving up, in units of unit
        unit - a TimeUnit determining how to interpret the timeout parameter
        Returns:
        the tail element, or null if all sorted sets are empty
      • pollFirstFromAny

        org.reactivestreams.Publisher<V> pollFirstFromAny​(long timeout,
                                                          TimeUnit unit,
                                                          String... queueNames)
        Removes and returns first available head element of any sorted set, waiting up to the specified wait time if necessary for an element to become available in any of defined sorted sets including this one.

        Requires Redis 5.0.0 and higher.

        Parameters:
        queueNames - - names of queue
        timeout - how long to wait before giving up, in units of unit
        unit - a TimeUnit determining how to interpret the timeout parameter
        Returns:
        the head element, or null if all sorted sets are empty
      • pollFirst

        org.reactivestreams.Publisher<V> pollFirst​(long timeout,
                                                   TimeUnit unit)
        Removes and returns the head element or null if this sorted set is empty.

        Requires Redis 5.0.0 and higher.

        Parameters:
        timeout - how long to wait before giving up, in units of unit
        unit - a TimeUnit determining how to interpret the timeout parameter
        Returns:
        the head element, or null if this sorted set is empty
      • pollLast

        org.reactivestreams.Publisher<V> pollLast​(long timeout,
                                                  TimeUnit unit)
        Removes and returns the tail element or null if this sorted set is empty.

        Requires Redis 5.0.0 and higher.

        Parameters:
        timeout - how long to wait before giving up, in units of unit
        unit - a TimeUnit determining how to interpret the timeout parameter
        Returns:
        the tail element or null if this sorted set is empty
      • pollFirst

        org.reactivestreams.Publisher<Collection<V>> pollFirst​(int count)
        Removes and returns the head elements or null if this sorted set is empty.
        Parameters:
        count - - elements amount
        Returns:
        the head element, or null if this sorted set is empty
      • pollLast

        org.reactivestreams.Publisher<Collection<V>> pollLast​(int count)
        Removes and returns the tail elements or null if this sorted set is empty.
        Parameters:
        count - - elements amount
        Returns:
        the tail element or null if this sorted set is empty
      • pollFirst

        org.reactivestreams.Publisher<V> pollFirst()
        Removes and returns the head element or null if this sorted set is empty.
        Returns:
        the head element, or null if this sorted set is empty
      • pollLast

        org.reactivestreams.Publisher<V> pollLast()
        Removes and returns the tail element or null if this sorted set is empty.
        Returns:
        the tail element or null if this sorted set is empty
      • first

        org.reactivestreams.Publisher<V> first()
        Returns the head element or null if this sorted set is empty.
        Returns:
        the head element or null if this sorted set is empty
      • last

        org.reactivestreams.Publisher<V> last()
        Returns the tail element or null if this sorted set is empty.
        Returns:
        the tail element or null if this sorted set is empty
      • firstScore

        org.reactivestreams.Publisher<Double> firstScore()
        Returns score of the head element or returns null if this sorted set is empty.
        Returns:
        the tail element or null if this sorted set is empty
      • lastScore

        org.reactivestreams.Publisher<Double> lastScore()
        Returns score of the tail element or returns null if this sorted set is empty.
        Returns:
        the tail element or null if this sorted set is empty
      • iterator

        org.reactivestreams.Publisher<V> iterator​(String pattern)
        Returns an iterator over elements in this set. If pattern is not null then only elements match this pattern are loaded.
        Parameters:
        pattern - - search pattern
        Returns:
        iterator
      • iterator

        org.reactivestreams.Publisher<V> iterator​(int count)
        Returns an iterator over elements in this set. Elements are loaded in batch. Batch size is defined by count param.
        Parameters:
        count - - size of elements batch
        Returns:
        iterator
      • iterator

        org.reactivestreams.Publisher<V> iterator​(String pattern,
                                                  int count)
        Returns an iterator over elements in this set. Elements are loaded in batch. Batch size is defined by count param. If pattern is not null then only elements match this pattern are loaded.
        Parameters:
        pattern - - search pattern
        count - - size of elements batch
        Returns:
        iterator
      • iterator

        org.reactivestreams.Publisher<V> iterator()
      • removeRangeByScore

        org.reactivestreams.Publisher<Integer> removeRangeByScore​(double startScore,
                                                                  boolean startScoreInclusive,
                                                                  double endScore,
                                                                  boolean endScoreInclusive)
      • removeRangeByRank

        org.reactivestreams.Publisher<Integer> removeRangeByRank​(int startIndex,
                                                                 int endIndex)
      • rank

        org.reactivestreams.Publisher<Integer> rank​(V o)
        Returns rank of value, with the scores ordered from low to high.
        Parameters:
        o - - object
        Returns:
        rank or null if value does not exist
      • revRank

        org.reactivestreams.Publisher<Integer> revRank​(V o)
        Returns rank of value, with the scores ordered from high to low.
        Parameters:
        o - - object
        Returns:
        rank or null if value does not exist
      • getScore

        org.reactivestreams.Publisher<Double> getScore​(V o)
      • add

        org.reactivestreams.Publisher<Boolean> add​(double score,
                                                   V object)
        Adds element to this set, overrides previous score if it has been already added.
        Parameters:
        score - - object score
        object - - object itself
        Returns:
        true if element has added and false if not.
      • addAll

        org.reactivestreams.Publisher<Long> addAll​(Map<V,​Double> objects)
      • addAndGetRank

        org.reactivestreams.Publisher<Integer> addAndGetRank​(double score,
                                                             V object)
        Adds element to this set, overrides previous score if it has been already added. Finally return the rank of the item
        Parameters:
        score - - object score
        object - - object itself
        Returns:
        rank
      • addAndGetRevRank

        org.reactivestreams.Publisher<Integer> addAndGetRevRank​(double score,
                                                                V object)
        Adds element to this set, overrides previous score if it has been already added. Finally return the reverse rank of the item
        Parameters:
        score - - object score
        object - - object itself
        Returns:
        reverse rank
      • tryAdd

        org.reactivestreams.Publisher<Boolean> tryAdd​(double score,
                                                      V object)
        Adds element to this set only if has not been added before.

        Requires Redis 3.0.2 and higher.

        Parameters:
        score - - object score
        object - - object itself
        Returns:
        true if element has added and false if not.
      • remove

        org.reactivestreams.Publisher<Boolean> remove​(V object)
      • size

        org.reactivestreams.Publisher<Integer> size()
      • contains

        org.reactivestreams.Publisher<Boolean> contains​(V o)
      • containsAll

        org.reactivestreams.Publisher<Boolean> containsAll​(Collection<?> c)
      • addScore

        org.reactivestreams.Publisher<Double> addScore​(V object,
                                                       Number value)
      • addScoreAndGetRevRank

        org.reactivestreams.Publisher<Integer> addScoreAndGetRevRank​(V object,
                                                                     Number value)
        Adds score to element and returns its reverse rank
        Parameters:
        object - - object itself
        value - - object score
        Returns:
        reverse rank
      • addScoreAndGetRank

        org.reactivestreams.Publisher<Integer> addScoreAndGetRank​(V object,
                                                                  Number value)
        Adds score to element and returns its rank
        Parameters:
        object - - object itself
        value - - object score
        Returns:
        rank
      • valueRange

        org.reactivestreams.Publisher<Collection<V>> valueRange​(int startIndex,
                                                                int endIndex)
      • entryRange

        org.reactivestreams.Publisher<Collection<ScoredEntry<V>>> entryRange​(int startIndex,
                                                                             int endIndex)
      • valueRange

        org.reactivestreams.Publisher<Collection<V>> valueRange​(double startScore,
                                                                boolean startScoreInclusive,
                                                                double endScore,
                                                                boolean endScoreInclusive)
      • entryRange

        org.reactivestreams.Publisher<Collection<ScoredEntry<V>>> entryRange​(double startScore,
                                                                             boolean startScoreInclusive,
                                                                             double endScore,
                                                                             boolean endScoreInclusive)
      • valueRange

        org.reactivestreams.Publisher<Collection<V>> valueRange​(double startScore,
                                                                boolean startScoreInclusive,
                                                                double endScore,
                                                                boolean endScoreInclusive,
                                                                int offset,
                                                                int count)
      • entryRange

        org.reactivestreams.Publisher<Collection<ScoredEntry<V>>> entryRange​(double startScore,
                                                                             boolean startScoreInclusive,
                                                                             double endScore,
                                                                             boolean endScoreInclusive,
                                                                             int offset,
                                                                             int count)
      • valueRangeReversed

        org.reactivestreams.Publisher<Collection<V>> valueRangeReversed​(int startIndex,
                                                                        int endIndex)
      • valueRangeReversed

        org.reactivestreams.Publisher<Collection<V>> valueRangeReversed​(double startScore,
                                                                        boolean startScoreInclusive,
                                                                        double endScore,
                                                                        boolean endScoreInclusive)
        Returns all values between startScore and endScore in reversed order.
        Parameters:
        startScore - - start score. Use Double.POSITIVE_INFINITY or Double.NEGATIVE_INFINITY to define infinity numbers
        startScoreInclusive - - start score inclusive
        endScore - - end score Use Double.POSITIVE_INFINITY or Double.NEGATIVE_INFINITY to define infinity numbers
        endScoreInclusive - - end score inclusive
        Returns:
        values
      • valueRangeReversed

        org.reactivestreams.Publisher<Collection<V>> valueRangeReversed​(double startScore,
                                                                        boolean startScoreInclusive,
                                                                        double endScore,
                                                                        boolean endScoreInclusive,
                                                                        int offset,
                                                                        int count)
      • entryRangeReversed

        org.reactivestreams.Publisher<Collection<ScoredEntry<V>>> entryRangeReversed​(int startIndex,
                                                                                     int endIndex)
      • entryRangeReversed

        org.reactivestreams.Publisher<Collection<ScoredEntry<V>>> entryRangeReversed​(double startScore,
                                                                                     boolean startScoreInclusive,
                                                                                     double endScore,
                                                                                     boolean endScoreInclusive)
      • entryRangeReversed

        org.reactivestreams.Publisher<Collection<ScoredEntry<V>>> entryRangeReversed​(double startScore,
                                                                                     boolean startScoreInclusive,
                                                                                     double endScore,
                                                                                     boolean endScoreInclusive,
                                                                                     int offset,
                                                                                     int count)
      • count

        org.reactivestreams.Publisher<Long> count​(double startScore,
                                                  boolean startScoreInclusive,
                                                  double endScore,
                                                  boolean endScoreInclusive)
        Returns the number of elements with a score between startScore and endScore.
        Parameters:
        startScore - - start score
        startScoreInclusive - - start score inclusive
        endScore - - end score
        endScoreInclusive - - end score inclusive
        Returns:
        count
      • readAll

        org.reactivestreams.Publisher<Collection<V>> readAll()
        Read all values at once.
        Returns:
        values
      • intersection

        org.reactivestreams.Publisher<Integer> intersection​(String... names)
        Intersect provided ScoredSortedSets and store result to current ScoredSortedSet
        Parameters:
        names - - names of ScoredSortedSet
        Returns:
        length of intersection
      • intersection

        org.reactivestreams.Publisher<Integer> intersection​(RScoredSortedSet.Aggregate aggregate,
                                                            String... names)
        Intersect provided ScoredSortedSets with defined aggregation method and store result to current ScoredSortedSet
        Parameters:
        aggregate - - score aggregation mode
        names - - names of ScoredSortedSet
        Returns:
        length of intersection
      • intersection

        org.reactivestreams.Publisher<Integer> intersection​(Map<String,​Double> nameWithWeight)
        Intersect provided ScoredSortedSets mapped to weight multiplier and store result to current ScoredSortedSet
        Parameters:
        nameWithWeight - - name of ScoredSortedSet mapped to weight multiplier
        Returns:
        length of intersection
      • intersection

        org.reactivestreams.Publisher<Integer> intersection​(RScoredSortedSet.Aggregate aggregate,
                                                            Map<String,​Double> nameWithWeight)
        Intersect provided ScoredSortedSets mapped to weight multiplier with defined aggregation method and store result to current ScoredSortedSet
        Parameters:
        aggregate - - score aggregation mode
        nameWithWeight - - name of ScoredSortedSet mapped to weight multiplier
        Returns:
        length of intersection
      • union

        org.reactivestreams.Publisher<Integer> union​(String... names)
        Union provided ScoredSortedSets and store result to current ScoredSortedSet
        Parameters:
        names - - names of ScoredSortedSet
        Returns:
        length of union
      • union

        org.reactivestreams.Publisher<Integer> union​(RScoredSortedSet.Aggregate aggregate,
                                                     String... names)
        Union provided ScoredSortedSets with defined aggregation method and store result to current ScoredSortedSet
        Parameters:
        aggregate - - score aggregation mode
        names - - names of ScoredSortedSet
        Returns:
        length of union
      • union

        org.reactivestreams.Publisher<Integer> union​(Map<String,​Double> nameWithWeight)
        Union provided ScoredSortedSets mapped to weight multiplier and store result to current ScoredSortedSet
        Parameters:
        nameWithWeight - - name of ScoredSortedSet mapped to weight multiplier
        Returns:
        length of union
      • union

        org.reactivestreams.Publisher<Integer> union​(RScoredSortedSet.Aggregate aggregate,
                                                     Map<String,​Double> nameWithWeight)
        Union provided ScoredSortedSets mapped to weight multiplier with defined aggregation method and store result to current ScoredSortedSet
        Parameters:
        aggregate - - score aggregation mode
        nameWithWeight - - name of ScoredSortedSet mapped to weight multiplier
        Returns:
        length of union
      • takeFirst

        org.reactivestreams.Publisher<V> takeFirst()
        Removes and returns the head element waiting if necessary for an element to become available.
        Returns:
        the head element
      • takeLast

        org.reactivestreams.Publisher<V> takeLast()
        Removes and returns the tail element waiting if necessary for an element to become available.
        Returns:
        the tail element