public class MemorySortedSetMultiMapState<K,T> extends TransactionalMemoryMapState<TreeSet<SortedSetMultiMapState.ScoredValue<T>>> implements SortedSetMultiMapState<K,T>
| Modifier and Type | Class and Description |
|---|---|
static class |
MemorySortedSetMultiMapState.Factory<K,T> |
TransactionalMemoryMapState.MemoryMapStateBacking<T>SortedSetMultiMapState.ScoredValue<V>| Constructor and Description |
|---|
MemorySortedSetMultiMapState(String id) |
| Modifier and Type | Method and Description |
|---|---|
protected TreeSet<SortedSetMultiMapState.ScoredValue<T>> |
get(K key) |
double |
getScore(K key,
T value)
Returns the score of value in the sorted set at key.
|
List<SortedSetMultiMapState.ScoredValue<T>> |
getSorted(K key,
int count)
Returns the specified range of elements in the sorted set stored at key.
|
boolean |
put(K key,
SortedSetMultiMapState.ScoredValue<T> scoredValue)
Adds the specified value with the specified score to the sorted set
stored at key.
|
long |
sizeOf(K key)
Returns the numbers of values which are mapped to a given key
|
beginCommit, commit, get, getTuples, multiGet, multiPut, multiUpdate, set, updatepublic MemorySortedSetMultiMapState(String id)
public long sizeOf(K key)
SortedSetMultiMapStatesizeOf in interface SortedSetMultiMapState<K,T>public boolean put(K key, SortedSetMultiMapState.ScoredValue<T> scoredValue)
SortedSetMultiMapStateput in interface SortedSetMultiMapState<K,T>key - key to storescoredValue - scored value to storetrue if this set changed as a result of the callpublic List<SortedSetMultiMapState.ScoredValue<T>> getSorted(K key, int count)
SortedSetMultiMapStategetSorted in interface SortedSetMultiMapState<K,T>key - the key whose associated set is usedcount - the maximum number of scored values returnedpublic double getScore(K key, T value)
SortedSetMultiMapStategetScore in interface SortedSetMultiMapState<K,T>key - the key whose associated set is usedvalue - the value whose score is searchedprotected TreeSet<SortedSetMultiMapState.ScoredValue<T>> get(K key)
Copyright © 2013. All rights reserved.