Package org.redisson

Class RedissonScoredSortedSet<V>

    • Method Detail

      • mapReduce

        public <KOut,​VOut> RCollectionMapReduce<V,​KOut,​VOut> mapReduce()
        Description copied from interface: RScoredSortedSet
        Returns RMapReduce object associated with this object
        Specified by:
        mapReduce in interface RScoredSortedSet<V>
        Type Parameters:
        KOut - output key
        VOut - output value
        Returns:
        MapReduce instance
      • pollFirst

        public V pollFirst()
        Description copied from interface: RScoredSortedSet
        Removes and returns the head element or null if this sorted set is empty.
        Specified by:
        pollFirst in interface RScoredSortedSet<V>
        Returns:
        the head element, or null if this sorted set is empty
      • pollLast

        public V pollLast()
        Description copied from interface: RScoredSortedSet
        Removes and returns the tail element or null if this sorted set is empty.
        Specified by:
        pollLast in interface RScoredSortedSet<V>
        Returns:
        the tail element or null if this sorted set is empty
      • pollFirst

        public Collection<V> pollFirst​(int count)
        Description copied from interface: RScoredSortedSet
        Removes and returns the head elements or null if this sorted set is empty.
        Specified by:
        pollFirst in interface RScoredSortedSet<V>
        Parameters:
        count - - elements amount
        Returns:
        the head element, or null if this sorted set is empty
      • pollLast

        public Collection<V> pollLast​(int count)
        Description copied from interface: RScoredSortedSet
        Removes and returns the tail elements or null if this sorted set is empty.
        Specified by:
        pollLast in interface RScoredSortedSet<V>
        Parameters:
        count - - elements amount
        Returns:
        the tail element or null if this sorted set is empty
      • pollFirstAsync

        public RFuture<Collection<V>> pollFirstAsync​(int count)
        Description copied from interface: RScoredSortedSetAsync
        Removes and returns the head elements or null if this sorted set is empty.
        Specified by:
        pollFirstAsync in interface RScoredSortedSetAsync<V>
        Parameters:
        count - - elements amount
        Returns:
        the head element, or null if this sorted set is empty
      • pollLastAsync

        public RFuture<Collection<V>> pollLastAsync​(int count)
        Description copied from interface: RScoredSortedSetAsync
        Removes and returns the tail elements or null if this sorted set is empty.
        Specified by:
        pollLastAsync in interface RScoredSortedSetAsync<V>
        Parameters:
        count - - elements amount
        Returns:
        the tail element or null if this sorted set is empty
      • pollFirst

        public V pollFirst​(long timeout,
                           TimeUnit unit)
        Description copied from interface: RScoredSortedSet
        Removes and returns the head element or null if this sorted set is empty.
        Specified by:
        pollFirst in interface RScoredSortedSet<V>
        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
      • pollFirstAsync

        public RFuture<V> pollFirstAsync​(long timeout,
                                         TimeUnit unit)
        Description copied from interface: RScoredSortedSetAsync
        Removes and returns the head element or null if this sorted set is empty.

        Requires Redis 5.0.0 and higher.

        Specified by:
        pollFirstAsync in interface RScoredSortedSetAsync<V>
        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
      • pollFirstFromAny

        public V pollFirstFromAny​(long timeout,
                                  TimeUnit unit,
                                  String... queueNames)
        Description copied from interface: RScoredSortedSet
        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.

        Specified by:
        pollFirstFromAny in interface RScoredSortedSet<V>
        Parameters:
        timeout - how long to wait before giving up, in units of unit
        unit - a TimeUnit determining how to interpret the timeout parameter
        queueNames - - names of queue
        Returns:
        the head element, or null if all sorted sets are empty
      • pollFirstFromAnyAsync

        public RFuture<V> pollFirstFromAnyAsync​(long timeout,
                                                TimeUnit unit,
                                                String... queueNames)
        Description copied from interface: RScoredSortedSetAsync
        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.

        Specified by:
        pollFirstFromAnyAsync in interface RScoredSortedSetAsync<V>
        Parameters:
        timeout - how long to wait before giving up, in units of unit
        unit - a TimeUnit determining how to interpret the timeout parameter
        queueNames - - names of queue
        Returns:
        the head element, or null if all sorted sets are empty
      • pollLastFromAny

        public V pollLastFromAny​(long timeout,
                                 TimeUnit unit,
                                 String... queueNames)
        Description copied from interface: RScoredSortedSet
        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.

        Specified by:
        pollLastFromAny in interface RScoredSortedSet<V>
        Parameters:
        timeout - how long to wait before giving up, in units of unit
        unit - a TimeUnit determining how to interpret the timeout parameter
        queueNames - - names of queue
        Returns:
        the tail element, or null if all sorted sets are empty
      • pollLastFromAnyAsync

        public RFuture<V> pollLastFromAnyAsync​(long timeout,
                                               TimeUnit unit,
                                               String... queueNames)
        Description copied from interface: RScoredSortedSetAsync
        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.

        Specified by:
        pollLastFromAnyAsync in interface RScoredSortedSetAsync<V>
        Parameters:
        timeout - how long to wait before giving up, in units of unit
        unit - a TimeUnit determining how to interpret the timeout parameter
        queueNames - - names of queue
        Returns:
        the tail element, or null if all sorted sets are empty
      • pollLast

        public V pollLast​(long timeout,
                          TimeUnit unit)
        Description copied from interface: RScoredSortedSet
        Removes and returns the tail element or null if this sorted set is empty.
        Specified by:
        pollLast in interface RScoredSortedSet<V>
        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
      • pollLastAsync

        public RFuture<V> pollLastAsync​(long timeout,
                                        TimeUnit unit)
        Description copied from interface: RScoredSortedSetAsync
        Removes and returns the tail element or null if this sorted set is empty.

        Requires Redis 5.0.0 and higher.

        Specified by:
        pollLastAsync in interface RScoredSortedSetAsync<V>
        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
      • add

        public boolean add​(double score,
                           V object)
        Description copied from interface: RScoredSortedSet
        Adds element to this set, overrides previous score if it has been already added.
        Specified by:
        add in interface RScoredSortedSet<V>
        Parameters:
        score - - object score
        object - - object itself
        Returns:
        true if element has added and false if not.
      • addAndGetRank

        public Integer addAndGetRank​(double score,
                                     V object)
        Description copied from interface: RScoredSortedSet
        Adds element to this set, overrides previous score if it has been already added. Finally return the rank of the item
        Specified by:
        addAndGetRank in interface RScoredSortedSet<V>
        Parameters:
        score - - object score
        object - - object itself
        Returns:
        rank
      • addAndGetRankAsync

        public RFuture<Integer> addAndGetRankAsync​(double score,
                                                   V object)
        Description copied from interface: RScoredSortedSetAsync
        Adds element to this set, overrides previous score if it has been already added. Finally return the rank of the item
        Specified by:
        addAndGetRankAsync in interface RScoredSortedSetAsync<V>
        Parameters:
        score - - object score
        object - - object itself
        Returns:
        rank
      • addAndGetRevRank

        public Integer addAndGetRevRank​(double score,
                                        V object)
        Description copied from interface: RScoredSortedSet
        Adds element to this set, overrides previous score if it has been already added. Finally return the reverse rank of the item
        Specified by:
        addAndGetRevRank in interface RScoredSortedSet<V>
        Parameters:
        score - - object score
        object - - object itself
        Returns:
        reverse rank
      • addAndGetRevRankAsync

        public RFuture<Integer> addAndGetRevRankAsync​(double score,
                                                      V object)
        Description copied from interface: RScoredSortedSetAsync
        Adds element to this set, overrides previous score if it has been already added. Finally return the reverse rank of the item
        Specified by:
        addAndGetRevRankAsync in interface RScoredSortedSetAsync<V>
        Parameters:
        score - - object score
        object - - object itself
        Returns:
        reverse rank
      • tryAdd

        public boolean tryAdd​(double score,
                              V object)
        Description copied from interface: RScoredSortedSet
        Adds element to this set only if has not been added before.

        Works only with Redis 3.0.2 and higher.

        Specified by:
        tryAdd in interface RScoredSortedSet<V>
        Parameters:
        score - - object score
        object - - object itself
        Returns:
        true if element has added and false if not.
      • first

        public V first()
        Description copied from interface: RScoredSortedSet
        Returns the head element or null if this sorted set is empty.
        Specified by:
        first in interface RScoredSortedSet<V>
        Returns:
        the head element or null if this sorted set is empty
      • last

        public V last()
        Description copied from interface: RScoredSortedSet
        Returns the tail element or null if this sorted set is empty.
        Specified by:
        last in interface RScoredSortedSet<V>
        Returns:
        the tail element or null if this sorted set is empty
      • firstScore

        public Double firstScore()
        Description copied from interface: RScoredSortedSet
        Returns score of the tail element or returns null if this sorted set is empty.
        Specified by:
        firstScore in interface RScoredSortedSet<V>
        Returns:
        the tail element or null if this sorted set is empty
      • lastScore

        public Double lastScore()
        Description copied from interface: RScoredSortedSet
        Returns score of the head element or returns null if this sorted set is empty.
        Specified by:
        lastScore in interface RScoredSortedSet<V>
        Returns:
        the tail element or null if this sorted set is empty
      • addAsync

        public RFuture<Boolean> addAsync​(double score,
                                         V object)
        Description copied from interface: RScoredSortedSetAsync
        Adds element to this set, overrides previous score if it has been already added.
        Specified by:
        addAsync in interface RScoredSortedSetAsync<V>
        Parameters:
        score - - object score
        object - - object itself
        Returns:
        true if element has added and false if not.
      • tryAddAsync

        public RFuture<Boolean> tryAddAsync​(double score,
                                            V object)
        Description copied from interface: RScoredSortedSetAsync
        Adds element to this set only if has not been added before.

        Requires Redis 3.0.2 and higher.

        Specified by:
        tryAddAsync in interface RScoredSortedSetAsync<V>
        Parameters:
        score - - object score
        object - - object itself
        Returns:
        true if element has added and false if not.
      • removeRangeByScore

        public int removeRangeByScore​(double startScore,
                                      boolean startScoreInclusive,
                                      double endScore,
                                      boolean endScoreInclusive)
        Specified by:
        removeRangeByScore in interface RScoredSortedSet<V>
      • isEmpty

        public boolean isEmpty()
        Description copied from interface: RScoredSortedSet
        Returns true if this set is empty
        Specified by:
        isEmpty in interface RScoredSortedSet<V>
        Returns:
        true if empty
      • getScore

        public Double getScore​(V o)
        Description copied from interface: RScoredSortedSet
        Returns score of element or null if it doesn't exist.
        Specified by:
        getScore in interface RScoredSortedSet<V>
        Parameters:
        o - - element
        Returns:
        score
      • rank

        public Integer rank​(V o)
        Description copied from interface: RScoredSortedSet
        Returns rank of value, with the scores ordered from low to high.
        Specified by:
        rank in interface RScoredSortedSet<V>
        Parameters:
        o - - object
        Returns:
        rank or null if value does not exist
      • iterator

        public Iterator<V> iterator​(String pattern)
        Description copied from interface: RScoredSortedSet
        Returns an iterator over elements in this set. If pattern is not null then only elements match this pattern are loaded.
        Specified by:
        iterator in interface RScoredSortedSet<V>
        Parameters:
        pattern - - search pattern
        Returns:
        iterator
      • iterator

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

        public Iterator<V> iterator​(String pattern,
                                    int count)
        Description copied from interface: RScoredSortedSet
        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.
        Specified by:
        iterator in interface RScoredSortedSet<V>
        Parameters:
        pattern - - search pattern
        count - - size of elements batch
        Returns:
        iterator
      • addScoreAndGetRevRank

        public Integer addScoreAndGetRevRank​(V object,
                                             Number value)
        Description copied from interface: RScoredSortedSet
        Adds score to element and returns its reverse rank
        Specified by:
        addScoreAndGetRevRank in interface RScoredSortedSet<V>
        Parameters:
        object - - object itself
        value - - object score
        Returns:
        reverse rank
      • valueRange

        public Collection<V> valueRange​(double startScore,
                                        boolean startScoreInclusive,
                                        double endScore,
                                        boolean endScoreInclusive)
        Description copied from interface: RScoredSortedSet
        Returns all values between startScore and endScore.
        Specified by:
        valueRange in interface RScoredSortedSet<V>
        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
      • valueRangeAsync

        public RFuture<Collection<V>> valueRangeAsync​(double startScore,
                                                      boolean startScoreInclusive,
                                                      double endScore,
                                                      boolean endScoreInclusive)
        Description copied from interface: RScoredSortedSetAsync
        Returns all values between startScore and endScore.
        Specified by:
        valueRangeAsync in interface RScoredSortedSetAsync<V>
        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

        public Collection<V> valueRangeReversed​(double startScore,
                                                boolean startScoreInclusive,
                                                double endScore,
                                                boolean endScoreInclusive)
        Description copied from interface: RScoredSortedSet
        Returns all values between startScore and endScore in reversed order.
        Specified by:
        valueRangeReversed in interface RScoredSortedSet<V>
        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
      • valueRangeReversedAsync

        public RFuture<Collection<V>> valueRangeReversedAsync​(double startScore,
                                                              boolean startScoreInclusive,
                                                              double endScore,
                                                              boolean endScoreInclusive)
        Description copied from interface: RScoredSortedSetAsync
        Returns all values between startScore and endScore in reversed order.
        Specified by:
        valueRangeReversedAsync in interface RScoredSortedSetAsync<V>
        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
      • valueRange

        public Collection<V> valueRange​(double startScore,
                                        boolean startScoreInclusive,
                                        double endScore,
                                        boolean endScoreInclusive,
                                        int offset,
                                        int count)
        Specified by:
        valueRange in interface RScoredSortedSet<V>
      • valueRangeReversed

        public Collection<V> valueRangeReversed​(double startScore,
                                                boolean startScoreInclusive,
                                                double endScore,
                                                boolean endScoreInclusive,
                                                int offset,
                                                int count)
        Specified by:
        valueRangeReversed in interface RScoredSortedSet<V>
      • revRank

        public Integer revRank​(V o)
        Description copied from interface: RScoredSortedSet
        Returns rank of value, with the scores ordered from high to low.
        Specified by:
        revRank in interface RScoredSortedSet<V>
        Parameters:
        o - - object
        Returns:
        rank or null if value does not exist
      • count

        public int count​(double startScore,
                         boolean startScoreInclusive,
                         double endScore,
                         boolean endScoreInclusive)
        Description copied from interface: RScoredSortedSet
        Returns the number of elements with a score between startScore and endScore.
        Specified by:
        count in interface RScoredSortedSet<V>
        Parameters:
        startScore - - start score
        startScoreInclusive - - start score inclusive
        endScore - - end score
        endScoreInclusive - - end score inclusive
        Returns:
        count of elements
      • countAsync

        public RFuture<Integer> countAsync​(double startScore,
                                           boolean startScoreInclusive,
                                           double endScore,
                                           boolean endScoreInclusive)
        Description copied from interface: RScoredSortedSetAsync
        Returns the number of elements with a score between startScore and endScore.
        Specified by:
        countAsync in interface RScoredSortedSetAsync<V>
        Parameters:
        startScore - - start score
        startScoreInclusive - - start score inclusive
        endScore - - end score
        endScoreInclusive - - end score inclusive
        Returns:
        count
      • intersection

        public int intersection​(String... names)
        Description copied from interface: RScoredSortedSet
        Intersect provided ScoredSortedSets and store result to current ScoredSortedSet
        Specified by:
        intersection in interface RScoredSortedSet<V>
        Parameters:
        names - - names of ScoredSortedSet
        Returns:
        length of intersection
      • intersection

        public int intersection​(RScoredSortedSet.Aggregate aggregate,
                                String... names)
        Description copied from interface: RScoredSortedSet
        Intersect provided ScoredSortedSets with defined aggregation method and store result to current ScoredSortedSet
        Specified by:
        intersection in interface RScoredSortedSet<V>
        Parameters:
        aggregate - - score aggregation mode
        names - - names of ScoredSortedSet
        Returns:
        length of intersection
      • intersection

        public int intersection​(Map<String,​Double> nameWithWeight)
        Description copied from interface: RScoredSortedSet
        Intersect provided ScoredSortedSets mapped to weight multiplier and store result to current ScoredSortedSet
        Specified by:
        intersection in interface RScoredSortedSet<V>
        Parameters:
        nameWithWeight - - name of ScoredSortedSet mapped to weight multiplier
        Returns:
        length of intersection
      • intersectionAsync

        public RFuture<Integer> intersectionAsync​(Map<String,​Double> nameWithWeight)
        Description copied from interface: RScoredSortedSetAsync
        Intersect provided ScoredSortedSets mapped to weight multiplier and store result to current ScoredSortedSet
        Specified by:
        intersectionAsync in interface RScoredSortedSetAsync<V>
        Parameters:
        nameWithWeight - - name of ScoredSortedSet mapped to weight multiplier
        Returns:
        length of intersection
      • intersection

        public int intersection​(RScoredSortedSet.Aggregate aggregate,
                                Map<String,​Double> nameWithWeight)
        Description copied from interface: RScoredSortedSet
        Intersect provided ScoredSortedSets mapped to weight multiplier with defined aggregation method and store result to current ScoredSortedSet
        Specified by:
        intersection in interface RScoredSortedSet<V>
        Parameters:
        aggregate - - score aggregation mode
        nameWithWeight - - name of ScoredSortedSet mapped to weight multiplier
        Returns:
        length of intersection
      • union

        public int union​(String... names)
        Description copied from interface: RScoredSortedSet
        Union provided ScoredSortedSets and store result to current ScoredSortedSet
        Specified by:
        union in interface RScoredSortedSet<V>
        Parameters:
        names - - names of ScoredSortedSet
        Returns:
        length of union
      • union

        public int union​(RScoredSortedSet.Aggregate aggregate,
                         String... names)
        Description copied from interface: RScoredSortedSet
        Union provided ScoredSortedSets with defined aggregation method and store result to current ScoredSortedSet
        Specified by:
        union in interface RScoredSortedSet<V>
        Parameters:
        aggregate - - score aggregation mode
        names - - names of ScoredSortedSet
        Returns:
        length of union
      • union

        public int union​(Map<String,​Double> nameWithWeight)
        Description copied from interface: RScoredSortedSet
        Union provided ScoredSortedSets mapped to weight multiplier and store result to current ScoredSortedSet
        Specified by:
        union in interface RScoredSortedSet<V>
        Parameters:
        nameWithWeight - - name of ScoredSortedSet mapped to weight multiplier
        Returns:
        length of union
      • unionAsync

        public RFuture<Integer> unionAsync​(Map<String,​Double> nameWithWeight)
        Description copied from interface: RScoredSortedSetAsync
        Union provided ScoredSortedSets mapped to weight multiplier and store result to current ScoredSortedSet
        Specified by:
        unionAsync in interface RScoredSortedSetAsync<V>
        Parameters:
        nameWithWeight - - name of ScoredSortedSet mapped to weight multiplier
        Returns:
        length of union
      • union

        public int union​(RScoredSortedSet.Aggregate aggregate,
                         Map<String,​Double> nameWithWeight)
        Description copied from interface: RScoredSortedSet
        Union provided ScoredSortedSets mapped to weight multiplier with defined aggregation method and store result to current ScoredSortedSet
        Specified by:
        union in interface RScoredSortedSet<V>
        Parameters:
        aggregate - - score aggregation mode
        nameWithWeight - - name of ScoredSortedSet mapped to weight multiplier
        Returns:
        length of union
      • readSort

        public Set<V> readSort​(SortOrder order)
        Description copied from interface: RSortable
        Read data in sorted view
        Specified by:
        readSort in interface RSortable<V>
        Parameters:
        order - for sorted data
        Returns:
        sorted collection
      • readSort

        public Set<V> readSort​(SortOrder order,
                               int offset,
                               int count)
        Description copied from interface: RSortable
        Read data in sorted view
        Specified by:
        readSort in interface RSortable<V>
        Parameters:
        order - for sorted data
        offset - of sorted data
        count - of sorted data
        Returns:
        sorted collection
      • readSortAsync

        public RFuture<Set<V>> readSortAsync​(SortOrder order,
                                             int offset,
                                             int count)
        Description copied from interface: RSortableAsync
        Read data in sorted view
        Specified by:
        readSortAsync in interface RSortableAsync<V>
        Parameters:
        order - for sorted data
        offset - of sorted data
        count - of sorted data
        Returns:
        sorted collection
      • readSort

        public Set<V> readSort​(String byPattern,
                               SortOrder order)
        Description copied from interface: RSortable
        Read data in sorted view
        Specified by:
        readSort in interface RSortable<V>
        Parameters:
        byPattern - that is used to generate the keys that are used for sorting
        order - for sorted data
        Returns:
        sorted collection
      • readSortAsync

        public RFuture<Set<V>> readSortAsync​(String byPattern,
                                             SortOrder order)
        Description copied from interface: RSortableAsync
        Read data in sorted view
        Specified by:
        readSortAsync in interface RSortableAsync<V>
        Parameters:
        byPattern - that is used to generate the keys that are used for sorting
        order - for sorted data
        Returns:
        sorted collection
      • readSort

        public Set<V> readSort​(String byPattern,
                               SortOrder order,
                               int offset,
                               int count)
        Description copied from interface: RSortable
        Read data in sorted view
        Specified by:
        readSort in interface RSortable<V>
        Parameters:
        byPattern - that is used to generate the keys that are used for sorting
        order - for sorted data
        offset - of sorted data
        count - of sorted data
        Returns:
        sorted collection
      • readSortAsync

        public RFuture<Set<V>> readSortAsync​(String byPattern,
                                             SortOrder order,
                                             int offset,
                                             int count)
        Description copied from interface: RSortableAsync
        Read data in sorted view
        Specified by:
        readSortAsync in interface RSortableAsync<V>
        Parameters:
        byPattern - that is used to generate the keys that are used for sorting
        order - for sorted data
        offset - of sorted data
        count - of sorted data
        Returns:
        sorted collection
      • readSort

        public <T> Collection<T> readSort​(String byPattern,
                                          List<String> getPatterns,
                                          SortOrder order)
        Description copied from interface: RSortable
        Read data in sorted view
        Specified by:
        readSort in interface RSortable<V>
        Type Parameters:
        T - object type
        Parameters:
        byPattern - that is used to generate the keys that are used for sorting
        getPatterns - that is used to load values by keys in sorted view
        order - for sorted data
        Returns:
        sorted collection
      • readSortAsync

        public <T> RFuture<Collection<T>> readSortAsync​(String byPattern,
                                                        List<String> getPatterns,
                                                        SortOrder order)
        Description copied from interface: RSortableAsync
        Read data in sorted view
        Specified by:
        readSortAsync in interface RSortableAsync<V>
        Type Parameters:
        T - object type
        Parameters:
        byPattern - that is used to generate the keys that are used for sorting
        getPatterns - that is used to load values by keys in sorted view
        order - for sorted data
        Returns:
        sorted collection
      • readSort

        public <T> Collection<T> readSort​(String byPattern,
                                          List<String> getPatterns,
                                          SortOrder order,
                                          int offset,
                                          int count)
        Description copied from interface: RSortable
        Read data in sorted view
        Specified by:
        readSort in interface RSortable<V>
        Type Parameters:
        T - object type
        Parameters:
        byPattern - that is used to generate the keys that are used for sorting
        getPatterns - that is used to load values by keys in sorted view
        order - for sorted data
        offset - of sorted data
        count - of sorted data
        Returns:
        sorted collection
      • readSortAsync

        public <T> RFuture<Collection<T>> readSortAsync​(String byPattern,
                                                        List<String> getPatterns,
                                                        SortOrder order,
                                                        int offset,
                                                        int count)
        Description copied from interface: RSortableAsync
        Read data in sorted view
        Specified by:
        readSortAsync in interface RSortableAsync<V>
        Type Parameters:
        T - object type
        Parameters:
        byPattern - that is used to generate the keys that are used for sorting
        getPatterns - that is used to load values by keys in sorted view
        order - for sorted data
        offset - of sorted data
        count - of sorted data
        Returns:
        sorted collection
      • readSortAlpha

        public Set<V> readSortAlpha​(SortOrder order)
        Description copied from interface: RSortable
        Read data in sorted view lexicographically
        Specified by:
        readSortAlpha in interface RSortable<V>
        Parameters:
        order - for sorted data
        Returns:
        sorted collection lexicographically
      • readSortAlpha

        public Set<V> readSortAlpha​(SortOrder order,
                                    int offset,
                                    int count)
        Description copied from interface: RSortable
        Read data in sorted view lexicographically
        Specified by:
        readSortAlpha in interface RSortable<V>
        Parameters:
        order - for sorted data
        offset - of sorted data
        count - of sorted data
        Returns:
        sorted collection lexicographically
      • readSortAlpha

        public Set<V> readSortAlpha​(String byPattern,
                                    SortOrder order)
        Description copied from interface: RSortable
        Read data in sorted view lexicographically
        Specified by:
        readSortAlpha in interface RSortable<V>
        Parameters:
        byPattern - that is used to generate the keys that are used for sorting
        order - for sorted data
        Returns:
        sorted collection lexicographically
      • readSortAlpha

        public Set<V> readSortAlpha​(String byPattern,
                                    SortOrder order,
                                    int offset,
                                    int count)
        Description copied from interface: RSortable
        Read data in sorted view lexicographically
        Specified by:
        readSortAlpha in interface RSortable<V>
        Parameters:
        byPattern - that is used to generate the keys that are used for sorting
        order - for sorted data
        offset - of sorted data
        count - of sorted data
        Returns:
        sorted collection lexicographically
      • readSortAlpha

        public <T> Collection<T> readSortAlpha​(String byPattern,
                                               List<String> getPatterns,
                                               SortOrder order)
        Description copied from interface: RSortable
        Read data in sorted view lexicographically
        Specified by:
        readSortAlpha in interface RSortable<V>
        Type Parameters:
        T - object type
        Parameters:
        byPattern - that is used to generate the keys that are used for sorting
        getPatterns - that is used to load values by keys in sorted view
        order - for sorted data
        Returns:
        sorted collection lexicographically
      • readSortAlpha

        public <T> Collection<T> readSortAlpha​(String byPattern,
                                               List<String> getPatterns,
                                               SortOrder order,
                                               int offset,
                                               int count)
        Description copied from interface: RSortable
        Read data in sorted view lexicographically
        Specified by:
        readSortAlpha in interface RSortable<V>
        Type Parameters:
        T - object type
        Parameters:
        byPattern - that is used to generate the keys that are used for sorting
        getPatterns - that is used to load values by keys in sorted view
        order - for sorted data
        offset - of sorted data
        count - of sorted data
        Returns:
        sorted collection lexicographically
      • readSortAlphaAsync

        public RFuture<Set<V>> readSortAlphaAsync​(SortOrder order,
                                                  int offset,
                                                  int count)
        Description copied from interface: RSortableAsync
        Read data in sorted view lexicographically
        Specified by:
        readSortAlphaAsync in interface RSortableAsync<V>
        Parameters:
        order - for sorted data
        offset - of sorted data
        count - of sorted data
        Returns:
        sorted collection lexicographically
      • readSortAlphaAsync

        public RFuture<Set<V>> readSortAlphaAsync​(String byPattern,
                                                  SortOrder order)
        Description copied from interface: RSortableAsync
        Read data in sorted view lexicographically
        Specified by:
        readSortAlphaAsync in interface RSortableAsync<V>
        Parameters:
        byPattern - that is used to generate the keys that are used for sorting
        order - for sorted data
        Returns:
        sorted collection lexicographically
      • readSortAlphaAsync

        public RFuture<Set<V>> readSortAlphaAsync​(String byPattern,
                                                  SortOrder order,
                                                  int offset,
                                                  int count)
        Description copied from interface: RSortableAsync
        Read data in sorted view lexicographically
        Specified by:
        readSortAlphaAsync in interface RSortableAsync<V>
        Parameters:
        byPattern - that is used to generate the keys that are used for sorting
        order - for sorted data
        offset - of sorted data
        count - of sorted data
        Returns:
        sorted collection lexicographically
      • readSortAlphaAsync

        public <T> RFuture<Collection<T>> readSortAlphaAsync​(String byPattern,
                                                             List<String> getPatterns,
                                                             SortOrder order)
        Description copied from interface: RSortableAsync
        Read data in sorted view lexicographically
        Specified by:
        readSortAlphaAsync in interface RSortableAsync<V>
        Type Parameters:
        T - object type
        Parameters:
        byPattern - that is used to generate the keys that are used for sorting
        getPatterns - that is used to load values by keys in sorted view
        order - for sorted data
        Returns:
        sorted collection lexicographically
      • readSortAlphaAsync

        public <T> RFuture<Collection<T>> readSortAlphaAsync​(String byPattern,
                                                             List<String> getPatterns,
                                                             SortOrder order,
                                                             int offset,
                                                             int count)
        Description copied from interface: RSortableAsync
        Read data in sorted view lexicographically
        Specified by:
        readSortAlphaAsync in interface RSortableAsync<V>
        Type Parameters:
        T - object type
        Parameters:
        byPattern - that is used to generate the keys that are used for sorting
        getPatterns - that is used to load values by keys in sorted view
        order - for sorted data
        offset - of sorted data
        count - of sorted data
        Returns:
        sorted collection lexicographically
      • sortTo

        public int sortTo​(String destName,
                          SortOrder order)
        Description copied from interface: RSortable
        Sort data and store to destName list
        Specified by:
        sortTo in interface RSortable<V>
        Parameters:
        destName - list object destination
        order - for sorted data
        Returns:
        length of sorted data
      • sortTo

        public int sortTo​(String destName,
                          SortOrder order,
                          int offset,
                          int count)
        Description copied from interface: RSortable
        Sort data and store to destName list
        Specified by:
        sortTo in interface RSortable<V>
        Parameters:
        destName - list object destination
        order - for sorted data
        offset - of sorted data
        count - of sorted data
        Returns:
        length of sorted data
      • sortToAsync

        public RFuture<Integer> sortToAsync​(String destName,
                                            SortOrder order,
                                            int offset,
                                            int count)
        Description copied from interface: RSortableAsync
        Sort data and store to destName list
        Specified by:
        sortToAsync in interface RSortableAsync<V>
        Parameters:
        destName - list object destination
        order - for sorted data
        offset - of sorted data
        count - of sorted data
        Returns:
        length of sorted data
      • sortTo

        public int sortTo​(String destName,
                          String byPattern,
                          SortOrder order,
                          int offset,
                          int count)
        Description copied from interface: RSortable
        Sort data and store to destName list
        Specified by:
        sortTo in interface RSortable<V>
        Parameters:
        destName - list object destination
        byPattern - that is used to generate the keys that are used for sorting
        order - for sorted data
        offset - of sorted data
        count - of sorted data
        Returns:
        length of sorted data
      • sortTo

        public int sortTo​(String destName,
                          String byPattern,
                          SortOrder order)
        Description copied from interface: RSortable
        Sort data and store to destName list
        Specified by:
        sortTo in interface RSortable<V>
        Parameters:
        destName - list object destination
        byPattern - that is used to generate the keys that are used for sorting
        order - for sorted data
        Returns:
        length of sorted data
      • sortToAsync

        public RFuture<Integer> sortToAsync​(String destName,
                                            String byPattern,
                                            SortOrder order)
        Description copied from interface: RSortableAsync
        Sort data and store to destName list
        Specified by:
        sortToAsync in interface RSortableAsync<V>
        Parameters:
        destName - list object destination
        byPattern - that is used to generate the keys that are used for sorting
        order - for sorted data
        Returns:
        length of sorted data
      • sortToAsync

        public RFuture<Integer> sortToAsync​(String destName,
                                            String byPattern,
                                            SortOrder order,
                                            int offset,
                                            int count)
        Description copied from interface: RSortableAsync
        Sort data and store to destName list
        Specified by:
        sortToAsync in interface RSortableAsync<V>
        Parameters:
        destName - list object destination
        byPattern - that is used to generate the keys that are used for sorting
        order - for sorted data
        offset - of sorted data
        count - of sorted data
        Returns:
        length of sorted data
      • sortTo

        public int sortTo​(String destName,
                          String byPattern,
                          List<String> getPatterns,
                          SortOrder order)
        Description copied from interface: RSortable
        Sort data and store to destName list
        Specified by:
        sortTo in interface RSortable<V>
        Parameters:
        destName - list object destination
        byPattern - that is used to generate the keys that are used for sorting
        getPatterns - that is used to load values by keys in sorted view
        order - for sorted data
        Returns:
        length of sorted data
      • sortToAsync

        public RFuture<Integer> sortToAsync​(String destName,
                                            String byPattern,
                                            List<String> getPatterns,
                                            SortOrder order)
        Description copied from interface: RSortableAsync
        Sort data and store to destName list
        Specified by:
        sortToAsync in interface RSortableAsync<V>
        Parameters:
        destName - list object destination
        byPattern - that is used to generate the keys that are used for sorting
        getPatterns - that is used to load values by keys in sorted view
        order - for sorted data
        Returns:
        length of sorted data
      • sortTo

        public int sortTo​(String destName,
                          String byPattern,
                          List<String> getPatterns,
                          SortOrder order,
                          int offset,
                          int count)
        Description copied from interface: RSortable
        Sort data and store to destName list
        Specified by:
        sortTo in interface RSortable<V>
        Parameters:
        destName - list object destination
        byPattern - that is used to generate the keys that are used for sorting
        getPatterns - that is used to load values by keys in sorted view
        order - for sorted data
        offset - of sorted data
        count - of sorted data
        Returns:
        length of sorted data
      • sortToAsync

        public RFuture<Integer> sortToAsync​(String destName,
                                            String byPattern,
                                            List<String> getPatterns,
                                            SortOrder order,
                                            int offset,
                                            int count)
        Description copied from interface: RSortableAsync
        Sort data and store to destName list
        Specified by:
        sortToAsync in interface RSortableAsync<V>
        Parameters:
        destName - list object destination
        byPattern - that is used to generate the keys that are used for sorting
        getPatterns - that is used to load values by keys in sorted view
        order - for sorted data
        offset - of sorted data
        count - of sorted data
        Returns:
        length of sorted data
      • expire

        public boolean expire​(long timeToLive,
                              TimeUnit timeUnit)
        Description copied from interface: RExpirable
        Set a timeout for object. After the timeout has expired, the key will automatically be deleted.
        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
        Set a timeout for object in async mode. After the timeout has expired, the key will automatically be deleted.
        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
        Set an expire date for object. When expire date comes the key will automatically be deleted.
        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
        Set an expire date for object in async mode. When expire date comes the key will automatically be deleted.
        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
      • expireAt

        public boolean expireAt​(Date timestamp)
        Description copied from interface: RExpirable
        Set an expire date for object. When expire date comes the key will automatically be deleted.
        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
        Set an expire date for object in async mode. When expire date comes the key will automatically be deleted.
        Specified by:
        expireAtAsync in interface RExpirableAsync
        Parameters:
        timestamp - - expire date
        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
      • 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
      • 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.