public interface KeyStore<K extends Comparable<K>>
Modifier and Type | Method and Description |
---|---|
void |
add(int shardId,
K key)
Add the given key under a shard index.
|
void |
clear(int shardId)
Removes all keys stored under a given shard index.
|
Set<K> |
keys(int shardId)
Return an unmodifiable
Set of keys for the given shard index. |
void |
remove(int shardId,
K key)
Remove the given key from a shard index.
|
void add(int shardId, K key)
shardId
- the shard index a key will be associated underkey
- the actual key to storevoid remove(int shardId, K key)
shardId
- the shard index a key will be removed fromkey
- the actual key to removevoid clear(int shardId)
shardId
- the shard index to remove all keys from