voldemort.utils
Class MoveMap
java.lang.Object
voldemort.utils.MoveMap
public class MoveMap
- extends java.lang.Object
Two dimensional counter. Currently used to count moves in a rebalancing plan.
The toString method is tailored to this use case. The structure may be
generally useful though, the 'indices' is hard-coded to be an Integer at this
time.
Constructor Summary |
MoveMap(java.util.Set<java.lang.Integer> ids)
|
Method Summary |
int |
add(int fromId,
int toId,
int amount)
|
void |
add(MoveMap rhs)
|
int |
get(int fromId,
int toId)
|
java.util.Map<java.lang.Integer,java.lang.Integer> |
groupByFrom()
|
java.util.Map<java.lang.Integer,java.lang.Integer> |
groupByTo()
|
int |
increment(int fromId,
int toId)
|
java.lang.String |
toFlowString()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
MoveMap
public MoveMap(java.util.Set<java.lang.Integer> ids)
increment
public int increment(int fromId,
int toId)
add
public int add(int fromId,
int toId,
int amount)
get
public int get(int fromId,
int toId)
add
public void add(MoveMap rhs)
groupByFrom
public java.util.Map<java.lang.Integer,java.lang.Integer> groupByFrom()
groupByTo
public java.util.Map<java.lang.Integer,java.lang.Integer> groupByTo()
toFlowString
public java.lang.String toFlowString()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Jay Kreps, Roshan Sumbaly, Alex Feinberg, Bhupesh Bansal, Lei Gao, Chinmay Soman, Vinoth Chandar, Zhongjie Wu