public class RedisSortedSetMultiMapState<K,V> extends AbstractRedisState<V> implements SortedSetMultiMapState<K,V>
| Modifier and Type | Class and Description |
|---|---|
static class |
RedisSortedSetMultiMapState.Factory<K,V> |
SortedSetMultiMapState.ScoredValue<V>config, id, pool, serializer| Constructor and Description |
|---|
RedisSortedSetMultiMapState(String id) |
RedisSortedSetMultiMapState(String id,
RedisConfig config) |
| Modifier and Type | Method and Description |
|---|---|
void |
beginCommit(Long txid) |
void |
commit(Long txid) |
double |
getScore(K key,
V value)
Returns the score of value in the sorted set at key.
|
List<SortedSetMultiMapState.ScoredValue<V>> |
getSorted(K key,
int count)
Returns the specified range of elements in the sorted set stored at key.
|
boolean |
put(K key,
SortedSetMultiMapState.ScoredValue<V> value)
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
|
flushAll, generateKey, generateKey, generateKeypublic RedisSortedSetMultiMapState(String id)
public RedisSortedSetMultiMapState(String id, RedisConfig config)
public void beginCommit(Long txid)
beginCommit in interface storm.trident.state.Statepublic void commit(Long txid)
commit in interface storm.trident.state.Statepublic long sizeOf(K key)
SortedSetMultiMapStatesizeOf in interface SortedSetMultiMapState<K,V>public boolean put(K key, SortedSetMultiMapState.ScoredValue<V> value)
SortedSetMultiMapStateput in interface SortedSetMultiMapState<K,V>key - key to storevalue - scored value to storetrue if this set changed as a result of the callpublic List<SortedSetMultiMapState.ScoredValue<V>> getSorted(K key, int count)
SortedSetMultiMapStategetSorted in interface SortedSetMultiMapState<K,V>key - the key whose associated set is usedcount - the maximum number of scored values returnedpublic double getScore(K key, V value)
SortedSetMultiMapStategetScore in interface SortedSetMultiMapState<K,V>key - the key whose associated set is usedvalue - the value whose score is searchedCopyright © 2013. All rights reserved.