Class ConnectionMBeanImpl
java.lang.Object
org.deltava.util.jmx.ConnectionMBeanImpl
- All Implemented Interfaces:
ConnectionMBean
A JMX bean for JDBC connection information.
- Since:
- 10.2
- Version:
- 11.4
- Author:
- Luke
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the average amount of time a connection has been used when reserved.getID()
Returns the connection ID.Returns the time this connection was last reserved.Returns the total amount of time this connection has been reserved.Returns the number of times this connection has been reserved.inUse()
Returns whether the connection is currently in use.Returns whether the connection is dynamic.
-
Constructor Details
-
ConnectionMBeanImpl
ConnectionMBeanImpl(org.gvagroup.pool.ConnectionInfo inf) Creates the bean.- Parameters:
inf
- a ConnectionInfo bean
-
-
Method Details
-
getID
Description copied from interface:ConnectionMBean
Returns the connection ID.- Specified by:
getID
in interfaceConnectionMBean
- Returns:
- the ID
-
isDynamic
Description copied from interface:ConnectionMBean
Returns whether the connection is dynamic.- Specified by:
isDynamic
in interfaceConnectionMBean
- Returns:
- TRUE if dynamic, otherwise FALSE
-
inUse
Description copied from interface:ConnectionMBean
Returns whether the connection is currently in use.- Specified by:
inUse
in interfaceConnectionMBean
- Returns:
- TRUE if in use, otherwise FALSE
-
getUseCount
Description copied from interface:ConnectionMBean
Returns the number of times this connection has been reserved.- Specified by:
getUseCount
in interfaceConnectionMBean
- Returns:
- the number of reservations
-
getTotalUse
Description copied from interface:ConnectionMBean
Returns the total amount of time this connection has been reserved.- Specified by:
getTotalUse
in interfaceConnectionMBean
- Returns:
- the total time in milliseconds
-
getAverageUse
Description copied from interface:ConnectionMBean
Returns the average amount of time a connection has been used when reserved.- Specified by:
getAverageUse
in interfaceConnectionMBean
- Returns:
- the average reservation time in milliseconds, or zero if never reserved
-
getLastUse
Description copied from interface:ConnectionMBean
Returns the time this connection was last reserved.- Specified by:
getLastUse
in interfaceConnectionMBean
- Returns:
- the last reservation date/time
-