org.apache.zookeeper
Class StatsTrack

java.lang.Object
  extended by org.apache.zookeeper.StatsTrack

public class StatsTrack
extends Object

a class that represents the stats associated with quotas


Constructor Summary
StatsTrack()
          a default constructor for stats
StatsTrack(String stats)
          the stat string should be of the form count=int,bytes=long if stats is called with null the count and bytes are initialized to -1.
 
Method Summary
 long getBytes()
          get the count of bytes allowed as part of quota
 int getCount()
          get the count of nodes allowed as part of quota
 void setBytes(long bytes)
          set teh bytes for this stat tracker.
 void setCount(int count)
          set the count for this stat tracker.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StatsTrack

public StatsTrack()
a default constructor for stats


StatsTrack

public StatsTrack(String stats)
the stat string should be of the form count=int,bytes=long if stats is called with null the count and bytes are initialized to -1.

Parameters:
stats - the stat string to be intialized with
Method Detail

getCount

public int getCount()
get the count of nodes allowed as part of quota

Returns:
the count as part of this string

setCount

public void setCount(int count)
set the count for this stat tracker.

Parameters:
count - the count to set with

getBytes

public long getBytes()
get the count of bytes allowed as part of quota

Returns:
the bytes as part of this string

setBytes

public void setBytes(long bytes)
set teh bytes for this stat tracker.

Parameters:
bytes - the bytes to set with

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011 The Apache Software Foundation