IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

com.ibm.websphere.objectgrid.stats
Class StatsSpec

java.lang.Object
  extended by com.ibm.websphere.objectgrid.stats.StatsSpec
All Implemented Interfaces:
Serializable

public final class StatsSpec
extends Object
implements Serializable

This class defines the statistics specification strings and integer masks to use for enabling and disabling statistics modules.

StatsSpec object can be constructed in the following three ways:

  1. Use new StatsSpec() and then call setStatSpec methods;
  2. Use new StatsSpec(int);
  3. Use new StatsSpec(String).

ObjectGrid supports the following statistic modules:

The statistic specification string is a ";" delimited string. The format of each sub string is "[STATISTIC]=[enabled|disabled]",where the value of [STATISTIC] can be one of the following:

Statistics ModuleStatistics StringDescription
AgentStatsModuleagent.allAll data grid agent statistics.
MapStatsModulemap.allAll map statistics.
MapStatsModulemap.batchupdateMap loader batch update time statistic.
MapStatsModulemap.hitrateMap hit rate statistic.
MapStatsModulemap.numentriesMap entry count statistic.
MapStatsModulemap.usedbytesMap entry size statistic.
HashIndexStatsModuleindex.allAll HashIndex statistics.
OGStatsModuleog.allAll ObjectGrid statistics.
OGStatsModuleog.transactiontimeObjectGrid transaction time statistic.
QueryStatsModulequery.allAll ObjectQuery and EntityManager Query statistics.
SessionStatsModulesession.allAll HTTP session statistics.

For example, "map.hitrate=enabled;map.numentries=enabled" will enable both the map hit rate statistic and the map number of entries statistic. "map.all=enabled" will enable all the map statistics.

The content of a Object Grid statistic specification is parsed from the left to the right. The statistic specification string scanned later will override the previously scanned string if they represent the same statistic. For example, "map.hitrate=enabled;map.all=disabled" will disable all the statistics, and "map.hitrate=disabled;map.batchupdate=enabled;map.hitrate=enabled" will enable both the map hit rate and map batch update time statistics.

the statistic specification string is case-insensitive. For example, "map.hitRATE=enabled" and "MAP.hitrate=ENABLED" are all valid statistic specification strings. However, users are encouraged to use the constant strings defined in this class.

Users can also use an integer to set the statistic specification. For example:

 setSpec(StatsSpec.MAP_HIT_RATE|StatsSpec.MAP_NUM_ENTRIES);
 

Since:
WAS XD 6.0.1
See Also:
StatsModule.getStatsSpec(), Serialized Form

Field Summary
static int AGENT_ALL
          An integer constant for all of the AgentManager agent and entity query statistics
static String AGENT_ALL_STRING
          A string constant for all of the AgentManager agent and entity query statistics
static int ALL
          An integer constant for all of the statistics
static String ALL_STRING
          A string constant for all of the statistics
static String DISABLED_STRING
          A string constant for the the "disabled" string
static String ENABLED_STRING
          A string constant for the "enabled" string
static int INDEX_ALL
          An integer constant for all of the index statistics
static String INDEX_ALL_STRING
          A string constant for all of the index statistics
static int MAP_ALL
          An integer constant for all of the map statistics
static String MAP_ALL_STRING
          A string constant for the all of the map statistics
static int MAP_BATCH_UPDATE_TIME
          An integer constant for the map loader batch update time statistics
static String MAP_BATCH_UPDATE_TIME_STRING
          A string constant for the map loader batch update statistic
static int MAP_HIT_RATE
          An integer constant for the map hit count statistic
static String MAP_HIT_RATE_STRING
          A string constant for the map hit rate statistic
static int MAP_NUM_ENTRIES
          An integer constant for the map number of entries statistic
static String MAP_NUM_ENTRIES_STRING
          A string constant for the map number of entries statistic
static int MAP_USED_BYTES
          An integer constant for the map number of bytes used statistic
static String MAP_USED_BYTES_STRING
          A string constant for the map used bytes statistic
static int NONE
          An integer constant for no statistics
static int OG_ALL
          An integer constant for all of the ObjectGrid statistics
static String OG_ALL_STRING
          A string constant for all of the ObjectGrid statistics
static int OG_TRANSACTION_TIME
          An integer constant for the ObjectGrid transaction time statistic
static String OG_TRANSACTION_TIME_STRING
          A string constant for the ObjectGrid transaction time statistic
static int QUERY_ALL
          An integer constant for all of the ObjectQuery and entity query statistics
static String QUERY_ALL_STRING
          A string constant for all of the ObjectQuery and entity query statistics
static int REPLICATION_ALL
          An integer constant for all of the replication statistics
static String REPLICATION_ALL_STRING
          A string constant for all of the replication statistics
static int SERVER_ALL
          An integer constant for all of the server statistics
static String SERVER_ALL_STRING
          A string constant for all of the server statistics
static int SERVER_PROCESS_TIME
          An integer constant for the server client request process time statistic
static String SERVER_PROCESS_TIME_STRING
          A string constant for the server client request process time statistic
static int SESSION_ALL
          An integer constant for all of the session statistics
static String SESSION_ALL_STRING
          A string constant for all of the session statistics
static String SPECIFICATION_DELIMIT
          The delimiter for separating the statistic specification string.
 
Constructor Summary
StatsSpec()
          Creates a new StatsSpec object with a NONE statistic specification
StatsSpec(int aSpecValue)
          Creates a new StatsSpec with an integer representation of the statistic specification.
StatsSpec(String spec)
          Creates a new StatsSpec object with a string representation of the statistic specification.
 
Method Summary
 void disableStatistic(int stat)
          Disables the specified statistics
 void enableStatistic(int stat)
          Enables the specified statistics
 String getSpecStringValue()
          Gets the string representation of the statistics specification
 int getSpecValue()
          Gets the integer representation of the statistics specification
 boolean isAnyAgentStatEnabled()
          Checks whether any agent statistic is enabled
 boolean isAnyIndexStatEnabled()
          Checks whether any index statistic is enabled
 boolean isAnyMapStatEnabled()
          Checks whether any map statistic is enabled
 boolean isAnyOGStatEnabled()
          Checks whether any ObjectGrid statistic is enabled
 boolean isAnyQueryStatEnabled()
          Checks whether any query statistic is enabled
 boolean isAnyReplicationStatEnabled()
          Checks whether any replication statistic is enabled
 boolean isAnyServerStatEnabled()
          Checks whether any server statistic is enabled
 boolean isAnySessionStatEnabled()
          Checks whether any session statistic is enabled
 boolean isStatisticEnabled(int stat)
          Determines whether the specified statistics are enabled
 void setSpec(int value)
          Sets the statistic specification
 void setSpec(String spec)
          Sets the statistic specification
 String toString()
          Gets the String representation of this StatsSpec
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SPECIFICATION_DELIMIT

public static final String SPECIFICATION_DELIMIT
The delimiter for separating the statistic specification string.

See Also:
Constant Field Values

ENABLED_STRING

public static final String ENABLED_STRING
A string constant for the "enabled" string

See Also:
Constant Field Values

DISABLED_STRING

public static final String DISABLED_STRING
A string constant for the the "disabled" string

See Also:
Constant Field Values

MAP_HIT_RATE_STRING

public static final String MAP_HIT_RATE_STRING
A string constant for the map hit rate statistic

See Also:
Constant Field Values

MAP_NUM_ENTRIES_STRING

public static final String MAP_NUM_ENTRIES_STRING
A string constant for the map number of entries statistic

See Also:
Constant Field Values

MAP_BATCH_UPDATE_TIME_STRING

public static final String MAP_BATCH_UPDATE_TIME_STRING
A string constant for the map loader batch update statistic

See Also:
Constant Field Values

MAP_USED_BYTES_STRING

public static final String MAP_USED_BYTES_STRING
A string constant for the map used bytes statistic

See Also:
Constant Field Values

MAP_ALL_STRING

public static final String MAP_ALL_STRING
A string constant for the all of the map statistics

See Also:
Constant Field Values

MAP_HIT_RATE

public static final int MAP_HIT_RATE
An integer constant for the map hit count statistic

See Also:
Constant Field Values

MAP_NUM_ENTRIES

public static final int MAP_NUM_ENTRIES
An integer constant for the map number of entries statistic

See Also:
Constant Field Values

MAP_BATCH_UPDATE_TIME

public static final int MAP_BATCH_UPDATE_TIME
An integer constant for the map loader batch update time statistics

See Also:
Constant Field Values

MAP_USED_BYTES

public static final int MAP_USED_BYTES
An integer constant for the map number of bytes used statistic

See Also:
Constant Field Values

MAP_ALL

public static final int MAP_ALL
An integer constant for all of the map statistics

See Also:
Constant Field Values

NONE

public static final int NONE
An integer constant for no statistics

See Also:
Constant Field Values

OG_TRANSACTION_TIME_STRING

public static final String OG_TRANSACTION_TIME_STRING
A string constant for the ObjectGrid transaction time statistic

See Also:
Constant Field Values

OG_ALL_STRING

public static final String OG_ALL_STRING
A string constant for all of the ObjectGrid statistics

See Also:
Constant Field Values

OG_TRANSACTION_TIME

public static final int OG_TRANSACTION_TIME
An integer constant for the ObjectGrid transaction time statistic

See Also:
Constant Field Values

OG_ALL

public static final int OG_ALL
An integer constant for all of the ObjectGrid statistics

See Also:
Constant Field Values

REPLICATION_ALL_STRING

public static final String REPLICATION_ALL_STRING
A string constant for all of the replication statistics

See Also:
Constant Field Values

REPLICATION_ALL

public static final int REPLICATION_ALL
An integer constant for all of the replication statistics

See Also:
Constant Field Values

SERVER_PROCESS_TIME_STRING

public static final String SERVER_PROCESS_TIME_STRING
A string constant for the server client request process time statistic

See Also:
Constant Field Values

SERVER_ALL_STRING

public static final String SERVER_ALL_STRING
A string constant for all of the server statistics

See Also:
Constant Field Values

SERVER_PROCESS_TIME

public static final int SERVER_PROCESS_TIME
An integer constant for the server client request process time statistic

See Also:
Constant Field Values

SERVER_ALL

public static final int SERVER_ALL
An integer constant for all of the server statistics

See Also:
Constant Field Values

SESSION_ALL_STRING

public static final String SESSION_ALL_STRING
A string constant for all of the session statistics

See Also:
Constant Field Values

SESSION_ALL

public static final int SESSION_ALL
An integer constant for all of the session statistics

See Also:
Constant Field Values

ALL_STRING

public static final String ALL_STRING
A string constant for all of the statistics

See Also:
Constant Field Values

INDEX_ALL

public static final int INDEX_ALL
An integer constant for all of the index statistics

Since:
WAS XD 6.1.0.5
See Also:
Constant Field Values

INDEX_ALL_STRING

public static final String INDEX_ALL_STRING
A string constant for all of the index statistics

Since:
WAS XD 6.1.0.5
See Also:
Constant Field Values

QUERY_ALL

public static final int QUERY_ALL
An integer constant for all of the ObjectQuery and entity query statistics

Since:
WAS XD 6.1.0.5
See Also:
Constant Field Values

QUERY_ALL_STRING

public static final String QUERY_ALL_STRING
A string constant for all of the ObjectQuery and entity query statistics

Since:
WAS XD 6.1.0.5
See Also:
Constant Field Values

AGENT_ALL

public static final int AGENT_ALL
An integer constant for all of the AgentManager agent and entity query statistics

Since:
WAS XD 6.1.0.5
See Also:
AgentManager, Constant Field Values

AGENT_ALL_STRING

public static final String AGENT_ALL_STRING
A string constant for all of the AgentManager agent and entity query statistics

Since:
WAS XD 6.1.0.5
See Also:
AgentManager, Constant Field Values

ALL

public static final int ALL
An integer constant for all of the statistics

See Also:
Constant Field Values
Constructor Detail

StatsSpec

public StatsSpec()
Creates a new StatsSpec object with a NONE statistic specification

See Also:
NONE

StatsSpec

public StatsSpec(String spec)
Creates a new StatsSpec object with a string representation of the statistic specification.

Parameters:
spec - the statistic specification

StatsSpec

public StatsSpec(int aSpecValue)
Creates a new StatsSpec with an integer representation of the statistic specification.

Parameters:
aSpecValue - the statistic specification int value
Method Detail

setSpec

public void setSpec(String spec)
Sets the statistic specification

Parameters:
spec - the statistic specification
Throws:
IllegalArgumentException - if the specified statistic specification is not valid

setSpec

public void setSpec(int value)
Sets the statistic specification

Parameters:
value - the statistic specification
Throws:
IllegalArgumentException - if the specified statistic specification is not valid

getSpecValue

public int getSpecValue()
Gets the integer representation of the statistics specification

Returns:
the statistic specification as an integer value

isStatisticEnabled

public boolean isStatisticEnabled(int stat)
Determines whether the specified statistics are enabled

Parameters:
stat - the integer representation of the statistics to check
Returns:
true if this StatsSpec enables the specified statistics.
Throws:
IllegalArgumentException - if the specified statistic is not valid

enableStatistic

public void enableStatistic(int stat)
Enables the specified statistics

Parameters:
stat - the integer representation of a statistic
Throws:
IllegalArgumentException - if the specified statistic is not valid

disableStatistic

public void disableStatistic(int stat)
Disables the specified statistics

Parameters:
stat - the integer representation of the statistics
Throws:
IllegalArgumentException - if the specified statistic is not valid

isAnyMapStatEnabled

public boolean isAnyMapStatEnabled()
Checks whether any map statistic is enabled

Returns:
true if any map statistic is enabled

isAnyQueryStatEnabled

public boolean isAnyQueryStatEnabled()
Checks whether any query statistic is enabled

Returns:
true if any query statistic is enabled
Since:
7.1

isAnyIndexStatEnabled

public boolean isAnyIndexStatEnabled()
Checks whether any index statistic is enabled

Returns:
true if any index statistic is enabled
Since:
7.1

isAnyAgentStatEnabled

public boolean isAnyAgentStatEnabled()
Checks whether any agent statistic is enabled

Returns:
true if any agent statistic is enabled
Since:
7.1

isAnyReplicationStatEnabled

public boolean isAnyReplicationStatEnabled()
Checks whether any replication statistic is enabled

Returns:
true if any replication statistic is enabled

isAnyOGStatEnabled

public boolean isAnyOGStatEnabled()
Checks whether any ObjectGrid statistic is enabled

Returns:
true if any ObjectGrid statistic is enabled

isAnyServerStatEnabled

public boolean isAnyServerStatEnabled()
Checks whether any server statistic is enabled

Returns:
true if any server statistic is enabled

isAnySessionStatEnabled

public boolean isAnySessionStatEnabled()
Checks whether any session statistic is enabled

Returns:
true if any session statistic is enabled

getSpecStringValue

public String getSpecStringValue()
Gets the string representation of the statistics specification

Returns:
the statistic specification as a string value

toString

public String toString()
Gets the String representation of this StatsSpec

Overrides:
toString in class Object
Returns:
the string representation of this object

IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

© Copyright International Business Machines Corp 2005,2012. All rights reserved.