Package org.apache.zookeeper
Class StatsTrack
- java.lang.Object
-
- org.apache.zookeeper.StatsTrack
-
public class StatsTrack extends java.lang.Objecta class that represents the stats associated with quotas
-
-
Constructor Summary
Constructors Constructor Description StatsTrack()a default constructor for statsStatsTrack(java.lang.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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetBytes()get the count of bytes allowed as part of quotaintgetCount()get the count of nodes allowed as part of quotavoidsetBytes(long bytes)set teh bytes for this stat tracker.voidsetCount(int count)set the count for this stat tracker.java.lang.StringtoString()
-
-
-
Constructor Detail
-
StatsTrack
public StatsTrack()
a default constructor for stats
-
StatsTrack
public StatsTrack(java.lang.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 java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-