V
- public class RedissonSortedSet<V> extends Object implements RSortedSet<V>
Modifier and Type | Class and Description |
---|---|
static class |
RedissonSortedSet.BinarySearchResult<V> |
static class |
RedissonSortedSet.NewScore |
Modifier and Type | Method and Description |
---|---|
boolean |
add(V value) |
boolean |
addAll(Collection<? extends V> c) |
io.netty.util.concurrent.Future<Boolean> |
addAsync(V value) |
RedissonSortedSet.BinarySearchResult<V> |
binarySearch(V value,
RedisConnection<Object,V> connection) |
static double |
calcIncrement(double value) |
protected RedissonSortedSet.NewScore |
calcNewScore(int index,
RedisConnection<Object,V> connection)
score for first entry = 0
score for entry added before = head - calcIncrement(head)
score for entry added after = tail + calcIncrement(head)
score for entry inserted between head and tail = head + (tail - head) / 2
|
void |
clear() |
void |
close() |
Comparator<? super V> |
comparator() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
void |
delete()
Deletes the object
|
V |
first() |
String |
getName()
Returns name of object
|
SortedSet<V> |
headSet(V toElement) |
boolean |
isEmpty() |
Iterator<V> |
iterator() |
Iterator<V> |
iterator(double startScore,
double endScore) |
V |
last() |
protected <V> io.netty.util.concurrent.Promise<V> |
newPromise() |
boolean |
remove(Object value) |
boolean |
removeAll(Collection<?> c) |
io.netty.util.concurrent.Future<Boolean> |
removeAsync(V 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
|
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 io.netty.util.concurrent.Future<Boolean> addAsync(V value)
addAsync
in interface RSortedSet<V>
public static double calcIncrement(double value)
protected RedissonSortedSet.NewScore calcNewScore(int index, RedisConnection<Object,V> connection)
index
- connection
- public io.netty.util.concurrent.Future<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>
true
if new comparator setted
false
otherwisepublic RedissonSortedSet.BinarySearchResult<V> binarySearch(V value, RedisConnection<Object,V> connection)
protected <V> io.netty.util.concurrent.Promise<V> newPromise()
public void delete()
RObject
public void close()
Copyright © 2014. All rights reserved.