|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.neeve.stats.Stats
public abstract class Stats
Root statistic class.
This class serves as the root class for all classes that export statistics
information. This class implements the IStats
interface that
not only serves as the root interface for all interfaces used to gather
statistical information but also specifies the interface used to start and
stop the periodic output of statistical information.
The startPeriodicOutput(int)
method starts a new thread that periodically
invokes the IStats.get(java.lang.StringBuilder)
abstract method to get output statistics that is
output using a tracer object private to this class that is bound to a logger
specified by the derived class during construction. stopPeriodicOutput()
is used to stop the periodic out put of statistical info. It terminates the
thread started by startPeriodicOutput(int)
.
Nested Class Summary | |
---|---|
static interface |
Stats.IAlertListener
Callback for receiving Stats alerts. |
static class |
Stats.LatencyManager
Class used to hold and compute and retrieve latencies statistics. |
Nested classes/interfaces inherited from interface com.neeve.stats.IStats |
---|
IStats.Counter, IStats.Gauge, IStats.Latencies, IStats.Series |
Method Summary | |
---|---|
void |
close()
Implementation of close() . |
String |
getLogger()
Implementation of getLogger() . |
String |
getName()
Implementation of getName() . |
String |
getType()
Implementation of getType() . |
void |
startPeriodicOutput(int interval)
Implementation of startPeriodicOutput(int) . |
void |
stopPeriodicOutput()
Implementation of startPeriodicOutput(int) . |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.neeve.stats.IStats |
---|
get |
Method Detail |
---|
public final String getType()
getType()
.
getType
in interface IStats
Each statistics object in a Neeve application is of a specific type Objects of the same type export the same statistics information and can be accessed using the same interface. This method returns the type of a statistics object. A statistics objects name and type are used to construct the name that uniquely identifies the object in the statistics registry.
IStats.getName()
,
StatsRegistry
public final String getName()
getName()
.
getName
in interface IStats
Each statistics object in a Neeve application is uniquely identified by a name within its type. This method returns the name of a statistics object. A statistics objects name and type are used to construct the name that uniquely identifies the object in the statistics registry.
IStats.getType()
,
StatsRegistry
public final String getLogger()
getLogger()
.
getLogger
in interface IStats
Each statistics object contains a tracer object used by the outputter
thread started by IStats.startPeriodicOutput(int)
. The tracer object is
bound to the logger whose name is returned by this method. The user
can configure the logger with the name returned from this method to
redirect the statistics output to a destination of choice.
public final void startPeriodicOutput(int interval)
startPeriodicOutput(int)
.
startPeriodicOutput
in interface IStats
interval
- The periodic interval, in seconds, at which the
statistics information is output.public final void stopPeriodicOutput()
startPeriodicOutput(int)
.
stopPeriodicOutput
in interface IStats
public final void close()
close()
.
close
in interface IStats
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |