Package com.sun.enterprise.admin.monitor.stats
When we analyze the Statistic interfaces that are defined by the J2EE Management Standard, it is evident that they are view-only data structures providing the accessors for various statistical data, e.g. CountStatistic. Every instance of CountStatistic is allowed to have only a getCount method (in addition to other meta data accessors), that returns a long. This limits the usability of these Statistic interfaces by the actual components that gather the data, because new instances of these interfaces have to be constructed as and when a query or measurement of that statistic is made. On the other hand, it is much more flexible to have mutators within implementations of these Statistic interfaces. But then, there is a possibility that the client who receives instances of these interfaces inadvertantly changes a particular statistic.
To solve this problem, this package makes the following provision:
It defines Statistic classes that have a State. A component that gathers data has to do the following:
- Implement the specific Stats interface. e.g. EJBCacheStats. This interface has a method which returns number of beans in cache as an instance of BoundedRangeStatistic.
- Initialize an instance of MutableBoundedRangeStatistic with an initial state. This interface exposes all the necessary methods that are required to reflect the change in state.
- Since MutableBoundedRangeStatistic provides a method that returns an unmodifiable view of itself, calls the MutableBoundedRangeStatistic.unmodifiableView() which returns BoundedRangeStatistic. This returned value can safely be sent to the caller to which everything is transparent.
Package Specification
Following Stats interfaces are part of this package. All of these extend the org.glassfish.j2ee.statistics.Stats interface.- EJBCacheStats
- EJBMethodStats
- EJBPoolStats
- OrbConnectionManagerStats
- OrbThreadPoolStats
- SunOneJVMStats
- StringStatistic - A String equivalent of CountStatistic.
- MutableStatistic - A Statistic that has some mutators. It is expected to be handled with care.
- MutableCountStatistic - A CountStatistic/BoundedRangeStatistic that is mutable.
- MutableTimeStatistic - A TimeStatistic that is mutable.
Following are the implementations of various Statistic interfaces in org.glassfish.j2ee.statistics package.
Interface | Immutable Implementation (read-only -- for clients) | Mutable Implementation (read-write -- for core components) |
CountStatistic | CountStatisticImpl | MutableCountStatisticImpl It implements MutableCountStatistic. |
BoundedRangeStatistic | BoundedRangeStatisticImpl | MutableBoundedRangeStatisticImpl It implements MutableCountStatistic. |
TimeStatistic | TimeStatisticImpl | MutableTimeStatisticImpl It implements MutableTimeStatistic. |
Following is a helper implementation done in this package: GenericStatsImpl.
This class is designed to facilitate the general implementation of Stats
interface and all the classes that implement this interface can leverage
this class. The main idea is that this class implements:
- getStatistic(String)
- getStatistics()
- getStatisticNames()
Related Documentation
org.glassfish.j2ee.statistics
Collections.unmodifiableMap(java.util.Map<? extends K, ? extends V>)
Collections.unmodifiableSet(java.util.Set<? extends T>)
@since S1AS8.0
-
Interface Summary Interface Description AverageRangeStatistic An interface that Specifies standard measurements of the lowest and highest values an attribute has held as well as its current value.ConnectionFactoryStats ConnectionPoolStats A Stats interface to represent the statistical data exposed by a Connection Pool.ConnectorConnectionPoolStats A Stats interface to represent the statistical data exposed by a Connector Connection Pool.ConnectorEndPointFactoryStats A Stats interface to represent the statistical data about Endpoint factory in the Connector ModuleConnectorWorkMgmtStats A Stats interface to represent the statistical data about Work Management in the Connector ModuleEJBCacheStats A Stats interface to represent the statistics exposed by the Enterprise Bean Cache.EJBMethodStats A Stats interface to represent the statistical data exposed by an EJB Business Method.EJBPoolStats A Stats interface to represent the statistical data exposed by an EJB Bean Pool.GFJTAStats Defines additional Sun ONE Application Server specific statistic to transaction service.HAStatefulSessionStoreStats HTTPListenerStats A Stats interface to represent the statistical data exposed by an HTTP Listener.JDBCConnectionPoolStats A Stats interface to represent the statistical data exposed by a JDBC Connection Pool.JVMClassLoadingStats A Stats interface, to expose the monitoring information about the JVM Classloading subsystemJVMCompilationStats A Stats interface, to expose the monitoring information about the JVM Compilation subsystemJVMGarbageCollectorStats A Stats interface, to expose the monitoring information about the JVM Garbage Collection subsystemJVMMemoryStats A Stats interface, to expose the monitoring information about the JVM memory subsystem.JVMOperatingSystemStats A Stats interface, to expose information about the Operating system on which the JVM is runningJVMRuntimeStats A Stats interface to expose information about the JVM RuntimeJVMThreadInfoStats A Stats interface, to expose the monitoring information about each individual thread in the the thread system of the JVM.JVMThreadStats A Stats interface, to expose the monitoring information about the thread system of the JVM.MutableCountStatistic An interface that imparts mutability to aCountStatistic
by the virtue of extending MutableStatistic.MutableStatistic An interface that gives a flexibility to set various values for a particular Statistic.MutableTimeStatistic Provides mutable nature to theTimeStatistic
.OrbConnectionManagerStats Stats interface for the monitorable attributes of the ORBConnectionManager This combines the statistics that were exposed in 7.0 with the new ones.PWCConnectionQueueStats ConnectionQueue information shows the number of sessions in the queue and the average delay before the connection is acceptedPWCDnsStats The DNS Cache caches IP addresses and DNS names.PWCFileCacheStats Provides statistical information on the httpservice file cachePWCHttpServiceStats Contains Statistical Information for the HttpServicePWCKeepAliveStats Provides statistical information about the HttpService HTTP-level keep-alive systemPWCRequestStats Interface representing statistical information about the request bucketPWCThreadPoolStats Returns the statistical information associated with the HttpService thread poolPWCVirtualServerStats Statistical information relevant to a virtual serverServletStats Defines additional Sun ONE Application Server specific statistics ServletStats interface.StatefulSessionStoreStats StringStatistic Custom statistic type created for the Sun ONE Application Server.ThreadPoolStats Stats interface for the monitorable attributes of the a generic ThreadPool.TimerServiceStats A Stats interface to represent the statistical data exposed by the Ejb Timer Service.WebModuleStats Interface for querying web module statistics. -
Class Summary Class Description AverageRangeStatisticImpl An implementation of a AverageRangeStatistic.BoundaryStatisticImpl An implementation of a BoundaryStatistic.BoundedRangeStatisticImpl An implementation of a BoundedRangeStatistic.CountStatisticImpl An implementation of a CountStatistic.GenericStatsImpl Provides for generic implementation of any Stats interface.MutableAverageRangeStatisticImpl An implementation of AverageRangeStatistic that provides ways to change the state externally through mutators.MutableBoundedRangeStatisticImpl An implementation of MutableCountStatistic that provides ways to change the state externally through mutators.MutableCountStatisticImpl An implementation of MutableCountStatistic that provides ways to change the state externally through mutators.MutableTimeStatisticImpl An implementation ofMutableTimeStatistic
that eases the various statistical calculations.RangeStatisticImpl An implementation of a RangeStatistic.StatisticImpl An abstract class providing implementation of the Statistic interface The intent is for this to be subclassed by all the StatisticImpls.StringStatisticImpl A basic implementation of the StringStatistic Interface.TimeStatisticImpl An implementation of a TimeStatistic.