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>
- Author:
- Nikita Koksharov
-
Nested Class Summary
-
Field Summary
Fields inherited from class org.redisson.RedissonObject
codec, name
-
Constructor Summary
ModifierConstructorDescriptionRedissonSortedSet
(Codec codec, CommandAsyncExecutor commandExecutor, String name, Redisson redisson) protected
RedissonSortedSet
(CommandAsyncExecutor commandExecutor, String name, RedissonClient redisson) -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
addAll
(Collection<? extends V> c) binarySearch
(V value, Codec codec) void
clear()
Comparator<? super V>
boolean
boolean
containsAll
(Collection<?> c) distributedIterator
(int count) Returns element iterator that can be shared across multiple applications.distributedIterator
(String iteratorName, int count) Returns iterator over elements that match specified pattern.first()
boolean
isEmpty()
iterator()
last()
<KOut,
VOut>
RCollectionMapReduce<V,KOut, VOut> ReturnsRMapReduce
object associated with this objectreadAll()
boolean
boolean
removeAll
(Collection<?> c) removeAsync
(Object value) boolean
retainAll
(Collection<?> c) int
size()
Object[]
toArray()
<T> T[]
toArray
(T[] a) toString()
boolean
trySetComparator
(Comparator<? super V> comparator) Sets new comparator only if current set is emptyMethods 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, 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 Details
-
RedissonSortedSet
protected RedissonSortedSet(CommandAsyncExecutor commandExecutor, String name, RedissonClient redisson) -
RedissonSortedSet
public RedissonSortedSet(Codec codec, CommandAsyncExecutor commandExecutor, String name, Redisson redisson)
-
-
Method Details
-
mapReduce
Description copied from interface:RSortedSet
ReturnsRMapReduce
object associated with this object- Specified by:
mapReduce
in interfaceRSortedSet<V>
- Type Parameters:
KOut
- output keyVOut
- output value- Returns:
- MapReduce instance
-
readAll
- Specified by:
readAll
in interfaceRSortedSet<V>
-
readAllAsync
- Specified by:
readAllAsync
in interfaceRSortedSet<V>
-
size
public int size() -
isEmpty
public boolean isEmpty() -
contains
-
iterator
-
toArray
-
toArray
public <T> T[] toArray(T[] a) -
add
-
addAsync
- Specified by:
addAsync
in interfaceRSortedSet<V>
-
removeAsync
- Specified by:
removeAsync
in interfaceRSortedSet<V>
-
remove
-
containsAll
- Specified by:
containsAll
in interfaceCollection<V>
- Specified by:
containsAll
in interfaceSet<V>
-
addAll
-
retainAll
-
removeAll
-
clear
public void clear() -
comparator
- Specified by:
comparator
in interfaceSortedSet<V>
-
subSet
-
headSet
-
tailSet
-
first
-
last
-
trySetComparator
Description copied from interface:RSortedSet
Sets new comparator only if current set is empty- Specified by:
trySetComparator
in interfaceRSortedSet<V>
- Parameters:
comparator
- for values- Returns:
true
if new comparator settedfalse
otherwise
-
distributedIterator
Description copied from interface:RSortedSet
Returns element iterator that can be shared across multiple applications. Creating multiple iterators on the same object with this method will result in a single shared iterator. See RList.distributedIterator(String, int) for creating different iterators.- Specified by:
distributedIterator
in interfaceRSortedSet<V>
- Parameters:
count
- batch size- Returns:
- shared elements iterator
-
distributedIterator
Description copied from interface:RSortedSet
Returns iterator over elements that match specified pattern. Iterator can be shared across multiple applications. Creating multiple iterators on the same object with this method will result in a single shared iterator. Iterator name must be resolved to the same hash slot as list name.- Specified by:
distributedIterator
in interfaceRSortedSet<V>
- Parameters:
iteratorName
- redis object name to which cursor will be savedcount
- batch size- Returns:
- shared elements iterator
-
binarySearch
-
toString
-