voldemort.store.stats
Class ClusterWideCounter

java.lang.Object
  extended by voldemort.store.stats.ClusterWideCounter

public class ClusterWideCounter
extends java.lang.Object

A thread-safe counter, that tracks per-node statistics and allows aggregation by node and zone


Constructor Summary
ClusterWideCounter(Cluster cluster)
           
 
Method Summary
 java.util.Map<java.lang.Integer,java.lang.Long> asMap()
           
 java.util.Map<java.lang.Integer,java.lang.Long> byZone()
           
 void clearCount()
           
 void clearCount(int nodeId)
           
 java.lang.Long getCount(int nodeId)
           
 java.lang.Long getTotalCount()
           
 void incrementCount(int nodeId)
           
 void setAll(java.util.Map<java.lang.Integer,java.lang.Long> newValues)
           
 void setCount(int nodeId, java.lang.Long newValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClusterWideCounter

public ClusterWideCounter(Cluster cluster)
Method Detail

incrementCount

public void incrementCount(int nodeId)

clearCount

public void clearCount()

clearCount

public void clearCount(int nodeId)

setCount

public void setCount(int nodeId,
                     java.lang.Long newValue)

setAll

public void setAll(java.util.Map<java.lang.Integer,java.lang.Long> newValues)

asMap

public java.util.Map<java.lang.Integer,java.lang.Long> asMap()

byZone

public java.util.Map<java.lang.Integer,java.lang.Long> byZone()

getCount

public java.lang.Long getCount(int nodeId)

getTotalCount

public java.lang.Long getTotalCount()


Jay Kreps, Roshan Sumbaly, Alex Feinberg, Bhupesh Bansal, Lei Gao, Chinmay Soman, Vinoth Chandar, Zhongjie Wu