All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.redisson.api.RLexSortedSet Maven / Gradle / Ivy

/**
 * Copyright 2018 Nikita Koksharov
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.redisson.api;

import java.util.Collection;

/**
 * Sorted set contained values of String type
 * 
 * @author Nikita Koksharov
 *
 */
public interface RLexSortedSet extends RLexSortedSetAsync, RSortedSet, RExpirable {
    
    String pollFirst();

    String pollLast();

    /**
     * Returns rank of value, with the scores ordered from high to low.
     * 
     * @param o - object
     * @return rank or null if value does not exist
     */
    Integer revRank(String o);
    
    int removeRangeTail(String fromElement, boolean fromInclusive);
    
    int removeRangeHead(String toElement, boolean toInclusive);

    int removeRange(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive);

    int countTail(String fromElement, boolean fromInclusive);

    int countHead(String toElement, boolean toInclusive);

    Collection rangeTail(String fromElement, boolean fromInclusive);

    Collection rangeHead(String toElement, boolean toInclusive);

    Collection range(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive);

    Collection rangeTail(String fromElement, boolean fromInclusive, int offset, int count);

    Collection rangeHead(String toElement, boolean toInclusive, int offset, int count);

    Collection range(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive, int offset, int count);

    Collection rangeTailReversed(String fromElement, boolean fromInclusive);

    Collection rangeHeadReversed(String toElement, boolean toInclusive);

    Collection rangeReversed(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive);

    Collection rangeTailReversed(String fromElement, boolean fromInclusive, int offset, int count);

    Collection rangeHeadReversed(String toElement, boolean toInclusive, int offset, int count);

    Collection rangeReversed(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive, int offset, int count);
    
    int count(String fromElement, boolean fromInclusive, String toElement, boolean toInclusive);

    Integer rank(String o);

    Collection range(int startIndex, int endIndex);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy