|
IBM WebSphereTM eXtreme Scale, Release 8.6 API Specification |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface StatsAccessor
This interface is used to access StatsFact objects from the statistic repository and set the statistic specification for all in-process ObjectGrid instances.
Retrieve a StatsAccessor instance using the StatsAccessorFactory.getStatsAccessor()
method
Setting the StatsSpec using the StatsAccessor only applies the stats specification to all ObjectGrid instances running in the current process (for example: currently allocated shards).
If the ObjectGrid is a distributed ObjectGrid, statistics specification can be set as follows:
xscmd
command-line utility.
StatsFact objects should only be used for local ObjectGrid instances or the client side (near cache) ObjectGrid instances. In a distributed environment, use the following mechanisms:
StatsFact
Method Summary | |
---|---|
StatsFact |
getStatsFact(String[] paths,
int moduleType)
Retrieves the StatsFact object based on the path. |
StatsFact |
getStatsFact(String path,
int moduleType)
Retrieves the StatsFact object based on the path. |
StatsSpec |
getStatsSpec()
Retrieves the StatsSpec defined for the process. |
void |
setStatsSpec(StatsSpec spec)
Sets the StatsSpec for all the local ObjectGrid instances in this process. |
void |
setStatsSpec(String specString)
Sets the StatsSpec for all the local ObjectGrid instances in this process. |
Method Detail |
---|
void setStatsSpec(StatsSpec spec)
The statistic specification is applied globally to the entire process and applies to all ObjectGrid and BackingMap instances when initialized. Instances that are already initialized will ignore any StatsSpec changes.
spec
- the StatsSpec to be setStatsSpec
void setStatsSpec(String specString)
The statistic specification is applied globally to the entire process and applies to all ObjectGrid and BackingMap instances when initialized. Instances that are already initialized will ignore any StatsSpec changes.
specString
- the StatsSpec string to be set.StatsSpec
StatsSpec getStatsSpec()
setStatsSpec
methods, or null
if
a setStatsSpec
method has not been calledStatsFact getStatsFact(String[] paths, int moduleType)
The path array contains the path to the module. Each path array index is defined follows:
Dynamic Deployment Topology
Local, in-memory ObjectGrid or client
If the path array contains only a partial path, it will return an aggregated StatsModule for that level. For example, in a dynamic deployment topology:
StatsFact sf = statsAccessor.getStatsFact(new String[]{"0", "root"}, StatsModule.MODULE_TYPE_OBJECT_GRID); OGStatsModule ogStats = (OGStatsModule) sf.getStatsModule(); System.out.println(ogStats.toString());will retrieve an OGStatsModule with statistics for all ObjectGrids for partition 0.
To limit the statistics scope to a single ObjectGrid, set additional arguments in the array. For example, in a dynamic deployment topology:
StatsFact sf = statsAccessor.getStatsFact(new String[]{"0", "root", "BookstoreGrid"}, StatsModule.MODULE_TYPE_OBJECT_GRID); OGStatsModule ogStats = (OGStatsModule) sf.getStatsModule(); System.out.println(ogStats.toString());will retrieve an OGStatsModule with statistics for the "BookStore" ObjectGrid for partition 0.
paths
- the array of paths to the modulemoduleType
- the module type defined in StatsModule
StatsFact getStatsFact(String path, int moduleType)
The path contains the path to the module. The path is defined as follows:
Dynamic Deployment Topology
Local, in-memory ObjectGrid or client
If the path array contains only a partial path, it will return an aggregated StatsModule for that level. For example, in a dynamic deployment topology:
StatsFact sf = statsAccessor.getStatsFact("0/root", StatsModule.MODULE_TYPE_OBJECT_GRID); OGStatsModule ogStats = (OGStatsModule) sf.getStatsModule(); System.out.println(ogStats.toString());will retrieve an OGStatsModule with statistics for all ObjectGrids for partition 0.
To limit the statistics scope to a single ObjectGrid, set additional arguments in the array. For example, in a dynamic deployment topology:
StatsFact sf = statsAccessor.getStatsFact("0/root/BookstoreGrid", StatsModule.MODULE_TYPE_OBJECT_GRID); OGStatsModule ogStats = (OGStatsModule) sf.getStatsModule(); System.out.println(ogStats.toString());will retrieve an OGStatsModule with statistics for the "BookStore" ObjectGrid for partition 0.
path
- the path to the modulemoduleType
- the module type defined in StatsModule
|
IBM WebSphereTM eXtreme Scale, Release 8.6 API Specification |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |