Package org.redisson
Class RedissonSortedSet<V>
- java.lang.Object
-
- org.redisson.RedissonObject
-
- org.redisson.RedissonSortedSet<V>
-
- Type Parameters:
V- value type
- All Implemented Interfaces:
Iterable<V>,Collection<V>,Set<V>,SortedSet<V>,RObject,RObjectAsync,RSortedSet<V>
public class RedissonSortedSet<V> extends RedissonObject implements RSortedSet<V>
- Author:
- Nikita Koksharov
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRedissonSortedSet.BinarySearchResult<V>
-
Field Summary
-
Fields inherited from class org.redisson.RedissonObject
codec, name
-
-
Constructor Summary
Constructors Modifier Constructor Description RedissonSortedSet(Codec codec, CommandAsyncExecutor commandExecutor, String name, Redisson redisson)protectedRedissonSortedSet(CommandAsyncExecutor commandExecutor, String name, RedissonClient redisson)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(V value)booleanaddAll(Collection<? extends V> c)RFuture<Boolean>addAsync(V value)RedissonSortedSet.BinarySearchResult<V>binarySearch(V value, Codec codec)voidclear()Comparator<? super V>comparator()booleancontains(Object o)booleancontainsAll(Collection<?> c)Vfirst()SortedSet<V>headSet(V toElement)booleanisEmpty()Iterator<V>iterator()Vlast()<KOut,VOut>
RCollectionMapReduce<V,KOut,VOut>mapReduce()ReturnsRMapReduceobject associated with this objectCollection<V>readAll()RFuture<Collection<V>>readAllAsync()booleanremove(Object value)booleanremoveAll(Collection<?> c)RFuture<Boolean>removeAsync(Object value)booleanretainAll(Collection<?> c)intsize()SortedSet<V>subSet(V fromElement, V toElement)SortedSet<V>tailSet(V fromElement)Object[]toArray()<T> T[]toArray(T[] a)StringtoString()booleantrySetComparator(Comparator<? super V> comparator)Sets new comparator only if current set is empty-
Methods inherited from class org.redisson.RedissonObject
addListener, addListener, addListenerAsync, addListenerAsync, copy, copyAsync, delete, deleteAsync, deleteAsync, dump, dumpAsync, encode, encode, encode, encode, encodeMapKey, encodeMapKeys, encodeMapValue, encodeMapValues, get, getCodec, getIdleTime, getIdleTimeAsync, getLockByMapKey, getLockByValue, getName, getRawName, getRawName, isExists, isExistsAsync, migrate, migrateAsync, move, moveAsync, prefixName, removeListener, removeListenerAsync, removeListenersAsync, rename, renameAsync, renamenx, renamenxAsync, restore, restore, restoreAndReplace, restoreAndReplace, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, setName, sizeInMemory, sizeInMemoryAsync, sizeInMemoryAsync, sizeInMemoryAsync, suffixName, toSeconds, toStream, touch, touchAsync, unlink, unlinkAsync
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface org.redisson.api.RObject
addListener, copy, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlink
-
Methods inherited from interface org.redisson.api.RObjectAsync
addListenerAsync, copyAsync, deleteAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsync
-
Methods inherited from interface java.util.SortedSet
spliterator
-
-
-
-
Constructor Detail
-
RedissonSortedSet
protected RedissonSortedSet(CommandAsyncExecutor commandExecutor, String name, RedissonClient redisson)
-
RedissonSortedSet
public RedissonSortedSet(Codec codec, CommandAsyncExecutor commandExecutor, String name, Redisson redisson)
-
-
Method Detail
-
mapReduce
public <KOut,VOut> RCollectionMapReduce<V,KOut,VOut> mapReduce()
Description copied from interface:RSortedSetReturnsRMapReduceobject associated with this object- Specified by:
mapReducein interfaceRSortedSet<V>- Type Parameters:
KOut- output keyVOut- output value- Returns:
- MapReduce instance
-
readAll
public Collection<V> readAll()
- Specified by:
readAllin interfaceRSortedSet<V>
-
readAllAsync
public RFuture<Collection<V>> readAllAsync()
- Specified by:
readAllAsyncin interfaceRSortedSet<V>
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
contains
public boolean contains(Object o)
-
toArray
public Object[] toArray()
-
toArray
public <T> T[] toArray(T[] a)
-
add
public boolean add(V value)
-
addAsync
public RFuture<Boolean> addAsync(V value)
- Specified by:
addAsyncin interfaceRSortedSet<V>
-
removeAsync
public RFuture<Boolean> removeAsync(Object value)
- Specified by:
removeAsyncin interfaceRSortedSet<V>
-
remove
public boolean remove(Object value)
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAllin interfaceCollection<V>- Specified by:
containsAllin interfaceSet<V>
-
addAll
public boolean addAll(Collection<? extends V> c)
-
retainAll
public boolean retainAll(Collection<?> c)
-
removeAll
public boolean removeAll(Collection<?> c)
-
clear
public void clear()
-
comparator
public Comparator<? super V> comparator()
- Specified by:
comparatorin interfaceSortedSet<V>
-
trySetComparator
public boolean trySetComparator(Comparator<? super V> comparator)
Description copied from interface:RSortedSetSets new comparator only if current set is empty- Specified by:
trySetComparatorin interfaceRSortedSet<V>- Parameters:
comparator- for values- Returns:
trueif new comparator settedfalseotherwise
-
binarySearch
public RedissonSortedSet.BinarySearchResult<V> binarySearch(V value, Codec codec)
-
-