V
- valuepublic class RedissonSortedSet<V> extends Object implements RSortedSet<V>
Modifier and Type | Class and Description |
---|---|
static class |
RedissonSortedSet.BinarySearchResult<V> |
Modifier | Constructor and Description |
---|---|
|
RedissonSortedSet(Codec codec,
CommandExecutor commandExecutor,
String name,
Redisson redisson) |
protected |
RedissonSortedSet(CommandExecutor commandExecutor,
String name,
Redisson redisson) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(V value) |
boolean |
addAll(Collection<? extends V> c) |
RFuture<Boolean> |
addAsync(V value) |
protected boolean |
await(RFuture<?> future,
long timeout,
TimeUnit timeoutUnit) |
RedissonSortedSet.BinarySearchResult<V> |
binarySearch(V value,
Codec codec) |
void |
clear() |
Comparator<? super V> |
comparator() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
boolean |
delete()
Deletes the object
|
RFuture<Boolean> |
deleteAsync()
Delete object in async mode
|
protected byte[] |
encode(Object value) |
protected byte[] |
encodeMapKey(Object value) |
protected byte[] |
encodeMapValue(Object value) |
V |
first() |
protected <V> V |
get(RFuture<V> future) |
Codec |
getCodec()
Returns the underlying Codec used by this RObject
|
String |
getName()
Returns name of object
|
SortedSet<V> |
headSet(V toElement) |
boolean |
isEmpty() |
boolean |
isExists()
Check object existence
|
RFuture<Boolean> |
isExistsAsync()
Check object existence in async mode.
|
Iterator<V> |
iterator() |
V |
last() |
void |
migrate(String host,
int port,
int database)
Transfer an object from source Redis instance to destination Redis instance
|
RFuture<Void> |
migrateAsync(String host,
int port,
int database)
Transfer an object from source Redis instance to destination Redis instance
in async mode
|
boolean |
move(int database)
Move object to another database
|
RFuture<Boolean> |
moveAsync(int database)
Move object to another database in async mode
|
protected <V> RPromise<V> |
newPromise() |
protected <V> RFuture<V> |
newSucceededFuture(V result) |
boolean |
remove(Object value) |
boolean |
removeAll(Collection<?> c) |
RFuture<Boolean> |
removeAsync(V value) |
void |
rename(String newName)
Rename current object key to
newName |
RFuture<Void> |
renameAsync(String newName)
Rename current object key to
newName
in async mode |
boolean |
renamenx(String newName)
Rename current object key to
newName
only if new key is not exists |
RFuture<Boolean> |
renamenxAsync(String newName)
Rename current object key to
newName
in async mode only if new key is not exists |
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
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
delete, getCodec, getName, isExists, migrate, move, rename, renamenx
deleteAsync, isExistsAsync, migrateAsync, moveAsync, renameAsync, renamenxAsync
protected RedissonSortedSet(CommandExecutor commandExecutor, String name, Redisson redisson)
public RedissonSortedSet(Codec codec, CommandExecutor commandExecutor, String name, Redisson redisson)
public int size()
public boolean isEmpty()
public boolean contains(Object o)
public Object[] toArray()
public <T> T[] toArray(T[] a)
public boolean add(V value)
public RFuture<Boolean> addAsync(V value)
addAsync
in interface RSortedSet<V>
public RFuture<Boolean> removeAsync(V value)
removeAsync
in interface RSortedSet<V>
public boolean remove(Object value)
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<V>
containsAll
in interface Set<V>
public boolean addAll(Collection<? extends V> c)
public boolean retainAll(Collection<?> c)
public boolean removeAll(Collection<?> c)
public void clear()
public Comparator<? super V> comparator()
comparator
in interface SortedSet<V>
public boolean trySetComparator(Comparator<? super V> comparator)
RSortedSet
trySetComparator
in interface RSortedSet<V>
comparator
- for valuestrue
if new comparator setted
false
otherwisepublic RedissonSortedSet.BinarySearchResult<V> binarySearch(V value, Codec codec)
protected boolean await(RFuture<?> future, long timeout, TimeUnit timeoutUnit) throws InterruptedException
InterruptedException
protected <V> V get(RFuture<V> future)
protected <V> RPromise<V> newPromise()
protected <V> RFuture<V> newSucceededFuture(V result)
public void rename(String newName)
RObject
newName
public RFuture<Void> renameAsync(String newName)
RObjectAsync
newName
in async moderenameAsync
in interface RObjectAsync
newName
- - new name of objectpublic void migrate(String host, int port, int database)
RObject
public RFuture<Void> migrateAsync(String host, int port, int database)
RObjectAsync
migrateAsync
in interface RObjectAsync
host
- - destination hostport
- - destination portdatabase
- - destination databasepublic boolean move(int database)
RObject
public RFuture<Boolean> moveAsync(int database)
RObjectAsync
moveAsync
in interface RObjectAsync
database
- - number of Redis databasetrue
if key was moved false
if notpublic boolean renamenx(String newName)
RObject
newName
only if new key is not existspublic RFuture<Boolean> renamenxAsync(String newName)
RObjectAsync
newName
in async mode only if new key is not existsrenamenxAsync
in interface RObjectAsync
newName
- - new name of objecttrue
if object has been renamed successfully and false
otherwisepublic boolean delete()
RObject
public RFuture<Boolean> deleteAsync()
RObjectAsync
deleteAsync
in interface RObjectAsync
true
if object was deleted false
if notpublic boolean isExists()
RObject
public RFuture<Boolean> isExistsAsync()
RObjectAsync
isExistsAsync
in interface RObjectAsync
true
if object exists and false
otherwisepublic Codec getCodec()
RObject
protected byte[] encode(Object value)
protected byte[] encodeMapKey(Object value)
protected byte[] encodeMapValue(Object value)
Copyright © 2014–2016 The Redisson Project. All rights reserved.