public abstract class Key2ValKVTable<K extends Key,V extends Value,P extends Key2ValKVPartition<K,V>> extends KVTable<P>
Constructor and Description |
---|
Key2ValKVTable(int tableID,
ValCombiner<V> combiner,
java.lang.Class<K> kClass,
java.lang.Class<V> vClass,
java.lang.Class<P> pClass) |
Modifier and Type | Method and Description |
---|---|
ValStatus |
addKeyVal(K key,
V val)
Add a new key-value pair to the table.
|
protected int |
getKVPartitionID(K key)
Get the partition Id by key
|
V |
getVal(K key)
Get the value associated with the key
|
V |
removeVal(K key)
Remove the value associated with the key
|
addPartition, free, getCombiner, getNumPartitions, getPartition, getPartitionIDs, getPartitions, getTableID, insertPartition, isEmpty, release, removePartition
public Key2ValKVTable(int tableID, ValCombiner<V> combiner, java.lang.Class<K> kClass, java.lang.Class<V> vClass, java.lang.Class<P> pClass)
public ValStatus addKeyVal(K key, V val)
key
- the keyval
- the valuepublic V getVal(K key)
key
- the keypublic V removeVal(K key)
key
- the keyprotected int getKVPartitionID(K key)
key
- the key