public class Int2LongKVTable extends KVTable<Int2LongKVPartition>
Constructor and Description |
---|
Int2LongKVTable(int tableID,
TypeLongCombiner combiner) |
Modifier and Type | Method and Description |
---|---|
void |
addKeyVal(int key,
long val)
Add a new key-value pair to the table.
|
protected int |
getKVPartitionID(int key)
Get the partition Id by key
|
long |
getVal(int key)
Get the value associated with the key
|
addPartition, free, getCombiner, getNumPartitions, getPartition, getPartitionIDs, getPartitions, getTableID, insertPartition, isEmpty, release, removePartition
public Int2LongKVTable(int tableID, TypeLongCombiner combiner)
public void addKeyVal(int key, long val)
key
- the keyval
- the valuepublic long getVal(int key)
key
- the keyprotected int getKVPartitionID(int key)
key
- the key