Interface RScoredSortedSetRx<V>

    • Method Summary

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

      • pollLastFromAny

        io.reactivex.Flowable<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

        io.reactivex.Flowable<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

        io.reactivex.Flowable<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

        io.reactivex.Flowable<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

        io.reactivex.Flowable<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

        io.reactivex.Flowable<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

        io.reactivex.Flowable<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

        io.reactivex.Flowable<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

        io.reactivex.Flowable<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

        io.reactivex.Flowable<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

        io.reactivex.Flowable<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

        io.reactivex.Flowable<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

        io.reactivex.Flowable<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

        io.reactivex.Flowable<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

        io.reactivex.Flowable<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

        io.reactivex.Flowable<V> iterator()
      • removeRangeByScore

        io.reactivex.Flowable<Integer> removeRangeByScore​(double startScore,
                                                          boolean startScoreInclusive,
                                                          double endScore,
                                                          boolean endScoreInclusive)
      • removeRangeByRank

        io.reactivex.Flowable<Integer> removeRangeByRank​(int startIndex,
                                                         int endIndex)
      • rank

        io.reactivex.Flowable<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

        io.reactivex.Flowable<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

        io.reactivex.Flowable<Double> getScore​(V o)
      • add

        io.reactivex.Flowable<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

        io.reactivex.Flowable<Long> addAll​(Map<V,​Double> objects)
      • addAndGetRank

        io.reactivex.Flowable<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

        io.reactivex.Flowable<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

        io.reactivex.Flowable<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

        io.reactivex.Flowable<Boolean> remove​(V object)
      • size

        io.reactivex.Flowable<Integer> size()
      • contains

        io.reactivex.Flowable<Boolean> contains​(V o)
      • addScore

        io.reactivex.Flowable<Double> addScore​(V object,
                                               Number value)
      • addScoreAndGetRevRank

        io.reactivex.Flowable<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

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

        io.reactivex.Flowable<Collection<V>> valueRange​(int startIndex,
                                                        int endIndex)
      • valueRange

        io.reactivex.Flowable<Collection<V>> valueRange​(double startScore,
                                                        boolean startScoreInclusive,
                                                        double endScore,
                                                        boolean endScoreInclusive)
      • entryRange

        io.reactivex.Flowable<Collection<ScoredEntry<V>>> entryRange​(double startScore,
                                                                     boolean startScoreInclusive,
                                                                     double endScore,
                                                                     boolean endScoreInclusive)
      • valueRange

        io.reactivex.Flowable<Collection<V>> valueRange​(double startScore,
                                                        boolean startScoreInclusive,
                                                        double endScore,
                                                        boolean endScoreInclusive,
                                                        int offset,
                                                        int count)
      • entryRange

        io.reactivex.Flowable<Collection<ScoredEntry<V>>> entryRange​(double startScore,
                                                                     boolean startScoreInclusive,
                                                                     double endScore,
                                                                     boolean endScoreInclusive,
                                                                     int offset,
                                                                     int count)
      • valueRangeReversed

        io.reactivex.Flowable<Collection<V>> valueRangeReversed​(int startIndex,
                                                                int endIndex)
      • valueRangeReversed

        io.reactivex.Flowable<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

        io.reactivex.Flowable<Collection<V>> valueRangeReversed​(double startScore,
                                                                boolean startScoreInclusive,
                                                                double endScore,
                                                                boolean endScoreInclusive,
                                                                int offset,
                                                                int count)
      • entryRangeReversed

        io.reactivex.Flowable<Collection<ScoredEntry<V>>> entryRangeReversed​(int startIndex,
                                                                             int endIndex)
      • entryRangeReversed

        io.reactivex.Flowable<Collection<ScoredEntry<V>>> entryRangeReversed​(double startScore,
                                                                             boolean startScoreInclusive,
                                                                             double endScore,
                                                                             boolean endScoreInclusive)
      • entryRangeReversed

        io.reactivex.Flowable<Collection<ScoredEntry<V>>> entryRangeReversed​(double startScore,
                                                                             boolean startScoreInclusive,
                                                                             double endScore,
                                                                             boolean endScoreInclusive,
                                                                             int offset,
                                                                             int count)
      • count

        io.reactivex.Flowable<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

        io.reactivex.Flowable<Collection<V>> readAll()
        Read all values at once.
        Returns:
        values
      • intersection

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

        io.reactivex.Flowable<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

        io.reactivex.Flowable<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

        io.reactivex.Flowable<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

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

        io.reactivex.Flowable<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

        io.reactivex.Flowable<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

        io.reactivex.Flowable<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

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

        io.reactivex.Flowable<V> takeLast()
        Removes and returns the tail element waiting if necessary for an element to become available.
        Returns:
        the tail element
      • takeFirstElements

        io.reactivex.Flowable<V> takeFirstElements()
        Retrieves and removes continues stream of elements from the head. Waits for next element become available.
        Returns:
        stream of head elements
      • takeLastElements

        io.reactivex.Flowable<V> takeLastElements()
        Retrieves and removes continues stream of elements from the tail. Waits for next element become available.
        Returns:
        stream of tail elements