Package org.apache.zookeeper
Class StatsTrack
- java.lang.Object
-
- org.apache.zookeeper.StatsTrack
-
public class StatsTrack extends java.lang.Object
a 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 long
getBytes()
get the count of bytes allowed as part of quotaint
getCount()
get the count of nodes allowed as part of quotavoid
setBytes(long bytes)
set teh bytes for this stat tracker.void
setCount(int count)
set the count for this stat tracker.java.lang.String
toString()
-
-
-
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:
toString
in classjava.lang.Object
-
-