|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Retention(value=RUNTIME) @Target(value={METHOD,FIELD}) @Inherited public @interface AppStat
Annotates fields in the application that provide a statistic value that will be collected by the engine's statistics collector. This annotation may directly annotate the field or may annotate a method that returns the field. The value returned by the method may be of the following types:
IStats.Counter
A primitive long value which is treated as a counterIStats.Latencies
A latency statIStats.Gauge
A gauge stat which is sampled for an instantaneous value.
If the field is discovered by a Talon Server during startup, the stat will be registered with
the application's AepEngine
, and will be included in the App's user stats in server
heartbeats.
NOTE: The field instance is introspected just after the AepEngine
is injected into
the application, prior to the initialize method being called. The value of the field at that
time must be non-null for the statistic to be registered. The annotated statistic instance
cannot be changed after initialization.
Optional Element Summary | |
---|---|
boolean |
gauge
When true the field or method is treated as returning a gauge value. |
String |
name
When this App stat is annotating a field or method that is treated as a IStats.Gauge specifis the name of the gauge. |
public abstract boolean gauge
Note that annotating a method that returns a primitive value is not zero garbage because autoboxing occurs when the the method is invoked via reflection.
public abstract String name
IStats.Gauge
specifis the name of the gauge.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |