|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IStats
Root statistics interface.
Various X entities collect runtime statistical information during their lifetime. This information is stored in class specific statistics classes and retrieved using class specific statistics interfaces. This interface serves as the root interface for such statistics interfaces.
Each statistics object is associated with a type and a name that uniquely identifies the object within its type. Objects of the same type export the same statistical information and can be accessed using the same interface. The name that uniquely identifies a statistics object in the statistics registry is constructed using the object type and name.
Nested Class Summary | |
---|---|
static interface |
IStats.Counter
Interface used to collect and provide access to a monotonically increasing counter. |
static interface |
IStats.Gauge
Interface used to collect an instantaneous value. |
static interface |
IStats.Latencies
Represents an IStats.Series used to collect latency timings. |
static interface |
IStats.Series
Interface used to collect series data points. |
Method Summary | |
---|---|
void |
close()
Close the statistics object This method closes the statistics object. |
void |
get(StringBuilder sb)
Get a snapshot of the statistics information in string format |
String |
getLogger()
Get the name of the logger attached to the statistical object. |
String |
getName()
Get the name of the statistics object. |
String |
getType()
Get the type of the statistics object. |
void |
startPeriodicOutput(int interval)
Start outputting statistics on a periodic basis. |
void |
stopPeriodicOutput()
Stop outputting statistics. |
Method Detail |
---|
String getType()
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.
getName()
,
StatsRegistry
String getName()
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.
getType()
,
StatsRegistry
String getLogger()
Each statistics object contains a tracer object used by the outputter
thread started by 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.
void startPeriodicOutput(int interval)
interval
- The periodic interval, in seconds, at which the
statistics information is output.void get(StringBuilder sb)
sb
- The stringbuilder object to append the statistics string.startPeriodicOutput(int)
This method returns a snapshot of the statistics information stored in the object in string format. The method is called periodically by the statistics outputter thread if started. The string is then output to the statistics tracer. The method is also available to users of the statistics object other than the statistics outputter.
void stopPeriodicOutput()
void close()
This method closes the statistics object. It shuts down the outputter thread if started and removes the object from the registry
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |