|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object xsmeral.pipe.stats.Stats
public class Stats
Provides means of monitoring statistics of object processors.
The monitoring points are created using the newFunction
method and results are stored in a processing context.
Values can be accessed directly (by methods of ProcessingContext) or by
StatsReader
designed specifically for this purpose.
The names of context parameters that hold the values have specific format:
stats.[group].[name]where
[group]
is either a class name of the processor or name
of other logical grouping and [name]
is name of one monitored
value.
ProcessingContext
Nested Class Summary | |
---|---|
static class |
Stats.Reader
The main implementation of StatsReader. |
Field Summary | |
---|---|
static String |
DEF_GROUP
|
static String |
PARAM_STATS
|
Constructor Summary | |
---|---|
Stats(ObjectProcessor processor)
Convenience constructor, creates the stat with group equal to the processor's simple class name and its associated context. |
|
Stats(String group,
ProcessingContext ctx)
Creates a Stats instance for the specified group and context. |
Method Summary | ||
---|---|---|
ProcessingContext |
getContext()
Returns the associated context, where values are stored. |
|
String |
getGroup()
Returns group name, which is either processor's simple class name or any other arbitrary name. |
|
static Stats.Reader |
getReader(ProcessingContext ctx)
Convenience method. |
|
|
newFunction(String name,
Class<? extends StatFunction<T>> function)
Returns StatFunction instance associated with this instance's context. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PARAM_STATS
public static final String DEF_GROUP
Constructor Detail |
---|
public Stats(ObjectProcessor processor)
public Stats(String group, ProcessingContext ctx)
Method Detail |
---|
public String getGroup()
public ProcessingContext getContext()
public static Stats.Reader getReader(ProcessingContext ctx)
new Stats.Reader(ctx)
public <T extends Number> StatFunction<T> newFunction(String name, Class<? extends StatFunction<T>> function)
name
- Name of the statfunction
- The StatFunction implementation to use
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |