|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.neeve.stats.StatsRegistry
public final class StatsRegistry
Stores operating statistics objects in a Neeve application.
The statistics registry is a singleton class that stores statistics objects
for operating entities in a Neeve application. Objects stored in the registry
are of type IStats
. Neeve classes store statistical information
in class specific statistics classes that implement interfaces derived from
IStats
. This registry stores such running instances of these
statistics classes. As specified by the IStats
, each statistics
object is uniquely identified by a name which serves as the key using which
the statistics object is stored in the registry. The statistics object
is added to the registry when first created and removed when closed. The
entity whose statistics are contained in the statistics object defines when
the object is created and closed.
The purpose of the statistics registry is to enable a user to query a statistics object by name and get information from the object or start and stop the periodic output of the contained statistical information in a human readble string format. For example, in case the user is interested in statistical information exported by a network link, the user would use the name assigned to the statistical object for the specific network link and query the registry for the object by the name. The user can then cast the obtained statistics object to the statistics interface specific to the network link and interact with the casted object.
Method Summary | |
---|---|
IStats |
get(String name)
Get a statistics object from the registry. |
static String |
getFullyQualifiedName(IStats stats)
Prepare the fully qualified name of a statistics object. |
static StatsRegistry |
getInstance()
Return the singleton statistics registry instance |
cern.colt.list.ObjectArrayList |
getValues()
Return a list of statistics objects in the registry. |
void |
put(IStats stats)
Put a statistics object into the registry. |
IStats |
remove(IStats stats)
Remove a statistics object from the registry. |
IStats |
remove(String name)
Remove a statistics object from the registry. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static StatsRegistry getInstance()
public static String getFullyQualifiedName(IStats stats)
stats
- The object whose name is to be prepared.
This method prepares the fully qualified name of a statistics object.
A fully qualified name is of the form
'
The fully qualified name of a statistics object is used as its key in
the registry.
public final void put(IStats stats) throws EStatsAlreadyPresentException
stats
- The statistics object to insert into the registry.
EStatsAlreadyPresentException
- Indicates that an object by
the statistics objects name is already present in the registry.
This method is intended for use by entities publicizing their statistics objects. This method adds the provided statistics object to the registry keyed by the fully qualfied name of the statistics object.
getFullyQualifiedName(com.neeve.stats.IStats)
public final IStats get(String name)
name
- The name used to identify the statistics object.
This method uses the supplied name to lookup a statistics object in the registry. A null value is returned in case no objectcould not be found for the specified name.
public final cern.colt.list.ObjectArrayList getValues()
This method returns a copy of the list of statistics objects in the registry. The user is free to modify the returned list concurrently with updating the registry.
public final IStats remove(IStats stats)
stats
- The stats object to remove.
This method uses the supplied name to remove a statistics object from the registry. A null value is returned in case no object with the specified name could be found.
public final IStats remove(String name)
name
- The fully qualified name of the stats object
to remove.
This method uses the supplied name to remove a statistics object from the registry. A null value is returned in case no object with the specified name could be found.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |