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 class
RedissonSortedSet.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)
protected
RedissonSortedSet(CommandAsyncExecutor commandExecutor, String name, RedissonClient redisson)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(V value)
boolean
addAll(Collection<? extends V> c)
RFuture<Boolean>
addAsync(V value)
RedissonSortedSet.BinarySearchResult<V>
binarySearch(V value, Codec codec)
void
clear()
Comparator<? super V>
comparator()
boolean
contains(Object o)
boolean
containsAll(Collection<?> c)
V
first()
SortedSet<V>
headSet(V toElement)
boolean
isEmpty()
Iterator<V>
iterator()
V
last()
<KOut,VOut>
RCollectionMapReduce<V,KOut,VOut>mapReduce()
ReturnsRMapReduce
object associated with this objectCollection<V>
readAll()
RFuture<Collection<V>>
readAllAsync()
boolean
remove(Object value)
boolean
removeAll(Collection<?> c)
RFuture<Boolean>
removeAsync(Object value)
boolean
retainAll(Collection<?> c)
int
size()
SortedSet<V>
subSet(V fromElement, V toElement)
SortedSet<V>
tailSet(V fromElement)
Object[]
toArray()
<T> T[]
toArray(T[] a)
String
toString()
boolean
trySetComparator(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:RSortedSet
ReturnsRMapReduce
object associated with this object- Specified by:
mapReduce
in interfaceRSortedSet<V>
- Type Parameters:
KOut
- output keyVOut
- output value- Returns:
- MapReduce instance
-
readAll
public Collection<V> readAll()
- Specified by:
readAll
in interfaceRSortedSet<V>
-
readAllAsync
public RFuture<Collection<V>> readAllAsync()
- Specified by:
readAllAsync
in 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:
addAsync
in interfaceRSortedSet<V>
-
removeAsync
public RFuture<Boolean> removeAsync(Object value)
- Specified by:
removeAsync
in interfaceRSortedSet<V>
-
remove
public boolean remove(Object value)
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAll
in interfaceCollection<V>
- Specified by:
containsAll
in 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:
comparator
in interfaceSortedSet<V>
-
trySetComparator
public boolean trySetComparator(Comparator<? super V> comparator)
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
-
binarySearch
public RedissonSortedSet.BinarySearchResult<V> binarySearch(V value, Codec codec)
-
-