com.ibm.websphere.pmi.stat
Class StatsImpljava.lang.Object | +--com.ibm.websphere.pmi.stat.StatsImpl
- All Implemented Interfaces:
- com.ibm.websphere.pmi.PmiConstants, java.io.Serializable, Stats, com.ibm.websphere.management.statistics.Stats, com.ibm.ws.pmi.wire.WpdCollection
- Direct Known Subclasses:
- EJBStatsImpl, JCAConnectionStatsImpl, JCAStatsImpl, JDBCConnectionStatsImpl, JDBCStatsImpl, JTAStatsImpl, JVMStatsImpl, ServletStatsImpl
- public class StatsImpl
- extends java.lang.Object
- implements Stats, com.ibm.ws.pmi.wire.WpdCollection, com.ibm.websphere.pmi.PmiConstants, java.io.Serializable
Implements com.ibm.websphere.pmi.stat.Stats interface. It also implements WpdCollection for backward compatibility.
- See Also:
- Serialized Form
Field Summary protected java.util.ArrayList dataMembers
protected int instrumentationLevel
protected java.lang.String name
static long serialVersionUID
protected java.lang.String statsType
protected java.util.ArrayList subCollections
protected long time
protected int type
Fields inherited from interface com.ibm.websphere.pmi.PmiConstants AE_35, AE_40, AES_40, ALL_DATA, APPSERVER_MODULE, BEAN_METHODS_SUBMODULE, BEAN_MODULE, CACHE_MODULE, COLLECTION_DESC, CONNPOOL_MODULE, DEFAULT_MODULE_PREFIX, EJB_ENTITY, EJB_MESSAGEDRIVEN, EJB_STATEFUL, EJB_STATELESS, INITIALIZATION_FAILED, INITIALIZING, INTERCEPTOR_SUBMODULE, J2C_CF, J2C_DS, J2C_JMS_CONNECTIONS, J2C_MODULE, JAVA_TIME_CONVERT_RATIO, JVMPI_MODULE, LEVEL_DISABLE, LEVEL_ENABLE, LEVEL_HIGH, LEVEL_HIGH_STRING, LEVEL_LOW, LEVEL_LOW_STRING, LEVEL_MAX, LEVEL_MAX_STRING, LEVEL_MEDIUM, LEVEL_MEDIUM_STRING, LEVEL_NONE, LEVEL_NONE_STRING, LEVEL_UNDEFINED, LOAD_AVG, LOST_CONTACT, METHODS_SUBMODULE_SHORTNAME, MSG_BUNDLE, NOT_IN_SUBMODULE, ORBPERF_MODULE, PMI_DISABLE_STRING, ROOT_DESC, ROOT_NAME, RUNNING, RUNTIME_MODULE, SERVLET_SUBMODULE, SERVLETS_SUBMODULE_SHORTNAME, SESSIONS_MODULE, STOPPED, SYSTEM_MODULE, TEMPLATE_SUBMODULE, TERMINATING, THREADPOOL_MODULE, TRAN_MODULE, TYPE_CATEGORY, TYPE_COLLECTION, TYPE_DATA, TYPE_DOUBLE, TYPE_INSTANCE, TYPE_INT, TYPE_INVALID, TYPE_LOAD, TYPE_LONG, TYPE_MODULE, TYPE_MODULEROOT, TYPE_NODE, TYPE_ROOT, TYPE_SERVER, TYPE_STAT, TYPE_SUBINSTANCE, TYPE_SUBMODULE, TYPE_UNDEFINED, UNINITIALIZED, UNKNOWN_ID, WEBAPP_MODULE, WEBSERVICES_MODULE, WEBSERVICES_SUBMODULE, WLM_CLIENT_MODULE, WLM_MODULE, WLM_SERVER_MODULE, WSGW_MODULE, XML_COLLECTION, XML_COUNT, XML_CREATETIME, XML_DOUBLE, XML_ENDCOLLECTION, XML_ENDLINE, XML_ENDMODULE, XML_ENDNODE, XML_ENDSERVER, XML_ENDTAG, XML_ID, XML_INT, XML_INTEGRAL, XML_LASTVALUE, XML_LOAD, XML_LONG, XML_MODULE, XML_NAME, XML_NODE, XML_QUOTE, XML_SERVER, XML_START, XML_STAT, XML_SUMOFSQUARES, XML_TIME, XML_TOTAL, XML_VALUE, XML_VIEW
Constructor Summary StatsImpl(java.lang.String name, int type)
StatsImpl(java.lang.String name, int type, int level)
StatsImpl(java.lang.String name, int type, int level, java.util.ArrayList dataMembers, java.util.ArrayList subCollections)
StatsImpl(java.lang.String statsType, java.lang.String name, int type, int level, java.util.ArrayList dataMembers, java.util.ArrayList subCollections)
Method Summary boolean add(Statistic newMember)
add a Statistic data - usually only called on server sideboolean add(Stats newMember)
add a Stats - usually only called on server sideboolean add(com.ibm.ws.pmi.wire.WpdCollection newMember)
boolean add(com.ibm.ws.pmi.wire.WpdData newMember)
java.util.ArrayList dataMembers()
com.ibm.ws.pmi.wire.WpdData getData(int dataId)
This method is defunc'edint getLevel()
get the instrumentation leveljava.lang.String getName()
Statistic getStatistic(int dataId)
get Statistic by data idcom.ibm.websphere.management.statistics.Statistic getStatistic(java.lang.String name)
JSR77 method - get Statistic object by namejava.lang.String[] getStatisticNames()
com.ibm.websphere.management.statistics.Statistic[] getStatistics()
JSR77 method - get all StatisticsStats getStats(java.lang.String name)
java.lang.String getStatsType()
com.ibm.ws.pmi.wire.WpdCollection getSubcollection(java.lang.String name)
This method is defunc'edStats[] getSubStats()
long getTime()
Set query time - the time when the client request comes to serverint getType()
java.lang.String[] listStatisticNames()
same as getStatisticNames methodStatistic[] listStatistics()
same as getStatistics methodStats[] listSubStats()
same as getSubStats methodboolean remove(int dataId)
boolean remove(java.lang.String name)
void resetOnClient(boolean recursive)
Reset on client onlyvoid setConfig(com.ibm.websphere.pmi.PmiModuleConfig config)
Call this method to set the static config info.void setDataMembers(java.util.ArrayList dataMembers)
void setLevel(int level)
set the instrumentation levelvoid setName(java.lang.String name)
void setStatistics(java.util.ArrayList dataMembers)
set data membersvoid setStatsType(java.lang.String modName)
void setSubcollections(java.util.ArrayList subCollections)
void setSubStats(java.util.ArrayList subCollections)
set sub-statsjava.util.ArrayList subCollections()
java.lang.String toString()
java.lang.String toString(java.lang.String indent)
java.lang.String toXML()
void update(Stats newStats, boolean keepOld, boolean recursiveUpdate)
Update this Stats using the newStats.
Methods inherited from class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Field Detail serialVersionUID
public static final long serialVersionUID
- See Also:
- Constant Field Values
statsType
protected java.lang.String statsType
name
protected java.lang.String name
type
protected int type
instrumentationLevel
protected int instrumentationLevel
dataMembers
protected java.util.ArrayList dataMembers
subCollections
protected java.util.ArrayList subCollections
time
protected long time
Constructor Detail StatsImpl
public StatsImpl(java.lang.String name, int type)
StatsImpl
public StatsImpl(java.lang.String name, int type, int level)
StatsImpl
public StatsImpl(java.lang.String name, int type, int level, java.util.ArrayList dataMembers, java.util.ArrayList subCollections)
StatsImpl
public StatsImpl(java.lang.String statsType, java.lang.String name, int type, int level, java.util.ArrayList dataMembers, java.util.ArrayList subCollections)
Method Detail getName
public java.lang.String getName()
- Specified by:
- getName in interface Stats
- Returns:
- name of the Stats
getStatsType
public java.lang.String getStatsType()
- Specified by:
- getStatsType in interface Stats
- Returns:
- Stats type. This type is used to bind the static information to the Stats
setName
public void setName(java.lang.String name)
- Specified by:
- setName in interface com.ibm.ws.pmi.wire.WpdCollection
setStatsType
public void setStatsType(java.lang.String modName)
getType
public int getType()
- Specified by:
- getType in interface Stats
- Returns:
- collection type. This type identifies the stats collection level in the PMI hierarcy.
getTime
public long getTime()
- Set query time - the time when the client request comes to server
- Specified by:
- getTime in interface Stats
getLevel
public int getLevel()
- get the instrumentation level
- Specified by:
- getLevel in interface Stats
setLevel
public void setLevel(int level)
- set the instrumentation level
- Specified by:
- setLevel in interface Stats
setStatistics
public void setStatistics(java.util.ArrayList dataMembers)
- set data members
- Specified by:
- setStatistics in interface Stats
setSubStats
public void setSubStats(java.util.ArrayList subCollections)
- set sub-stats
- Specified by:
- setSubStats in interface Stats
getStatistic
public Statistic getStatistic(int dataId)
- get Statistic by data id
- Specified by:
- getStatistic in interface Stats
getStatistic
public com.ibm.websphere.management.statistics.Statistic getStatistic(java.lang.String name)
- JSR77 method - get Statistic object by name
- Specified by:
- getStatistic in interface com.ibm.websphere.management.statistics.Stats
getStatistics
public com.ibm.websphere.management.statistics.Statistic[] getStatistics()
- JSR77 method - get all Statistics
- Specified by:
- getStatistics in interface com.ibm.websphere.management.statistics.Stats
getStatisticNames
public java.lang.String[] getStatisticNames()
- Specified by:
- getStatisticNames in interface com.ibm.websphere.management.statistics.Stats
getStats
public Stats getStats(java.lang.String name)
- Specified by:
- getStats in interface Stats
- Returns:
- the sub-stat by the name
getSubStats
public Stats[] getSubStats()
- Specified by:
- getSubStats in interface Stats
- Returns:
- all the sub-stats in it.
listStatisticNames
public java.lang.String[] listStatisticNames()
- Description copied from interface: Stats
- same as getStatisticNames method
- Specified by:
- listStatisticNames in interface Stats
listStatistics
public Statistic[] listStatistics()
- Description copied from interface: Stats
- same as getStatistics method
- Specified by:
- listStatistics in interface Stats
listSubStats
public Stats[] listSubStats()
- Description copied from interface: Stats
- same as getSubStats method
- Specified by:
- listSubStats in interface Stats
add
public boolean add(Statistic newMember)
- Description copied from interface: Stats
- add a Statistic data - usually only called on server side
- Specified by:
- add in interface Stats
add
public boolean add(Stats newMember)
- Description copied from interface: Stats
- add a Stats - usually only called on server side
- Specified by:
- add in interface Stats
remove
public boolean remove(int dataId)
- Specified by:
- remove in interface com.ibm.ws.pmi.wire.WpdCollection
remove
public boolean remove(java.lang.String name)
- Specified by:
- remove in interface com.ibm.ws.pmi.wire.WpdCollection
toString
public java.lang.String toString()
- Specified by:
- toString in interface Stats
- Overrides:
- toString in class java.lang.Object
toString
public java.lang.String toString(java.lang.String indent)
- Specified by:
- toString in interface Stats
setConfig
public void setConfig(com.ibm.websphere.pmi.PmiModuleConfig config)
- Description copied from interface: Stats
- Call this method to set the static config info.
Note that the PMI data retrieved from server only have the value and time stamp information. If you use PmiClient API, PmiClient will link the static config info with the dynamic value together for the data. However, if you use JMX API direclty, you have to link them togehter after you get the data. Otherwise, static config info like name, description, unit, etc will be null. Static config info can be cached and used for all the data retrieval.
- Specified by:
- setConfig in interface Stats
add
public boolean add(com.ibm.ws.pmi.wire.WpdData newMember)
- Specified by:
- add in interface com.ibm.ws.pmi.wire.WpdCollection
add
public boolean add(com.ibm.ws.pmi.wire.WpdCollection newMember)
- Specified by:
- add in interface com.ibm.ws.pmi.wire.WpdCollection
toXML
public java.lang.String toXML()
- Specified by:
- toXML in interface com.ibm.ws.pmi.wire.WpdCollection
setDataMembers
public void setDataMembers(java.util.ArrayList dataMembers)
- Specified by:
- setDataMembers in interface com.ibm.ws.pmi.wire.WpdCollection
setSubcollections
public void setSubcollections(java.util.ArrayList subCollections)
- Specified by:
- setSubcollections in interface com.ibm.ws.pmi.wire.WpdCollection
dataMembers
public java.util.ArrayList dataMembers()
- Specified by:
- dataMembers in interface com.ibm.ws.pmi.wire.WpdCollection
subCollections
public java.util.ArrayList subCollections()
- Specified by:
- subCollections in interface com.ibm.ws.pmi.wire.WpdCollection
getData
public com.ibm.ws.pmi.wire.WpdData getData(int dataId)
- This method is defunc'ed
- Specified by:
- getData in interface com.ibm.ws.pmi.wire.WpdCollection
getSubcollection
public com.ibm.ws.pmi.wire.WpdCollection getSubcollection(java.lang.String name)
- This method is defunc'ed
- Specified by:
- getSubcollection in interface com.ibm.ws.pmi.wire.WpdCollection
update
public void update(Stats newStats, boolean keepOld, boolean recursiveUpdate)
- Update this Stats using the newStats. Note: this Stats and newStats must represent the same Pmi module/submodule. It is caller's responsibility since simply checking name and type here may not be sufficient.
- Specified by:
- update in interface Stats
- Parameters:
- newStats - the new value of the Stats
- keepOld - do not remove the old data/subStats that are not in newStats when it is true
- recursiveUpdate - recursively update the sub-stats when it is true
resetOnClient
public void resetOnClient(boolean recursive)
- Description copied from interface: Stats
- Reset on client only
- Specified by:
- resetOnClient in interface Stats
WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.
IBM is a trademark of the IBM Corporation in the United States, other countries, or both.