Class JMXConnectionPool
java.lang.Object
org.deltava.util.jmx.JMXConnectionPool
- All Implemented Interfaces:
ConnectionPoolMXBean
,JMXRefresh
A JMX bean to export Connection Pool statistics.
- Since:
- 10.2
- Version:
- 11.4
- Author:
- Luke
-
Constructor Summary
ConstructorsConstructorDescriptionJMXConnectionPool
(String code, org.gvagroup.pool.ConnectionPool<?> pool) Initializes the bean. -
Method Summary
Modifier and TypeMethodDescriptionReturns the length of the maximum connection borrow time since the last refresh.Returns the length of the maximum connection wait time since the last refresh.Returns a collection of connection information.Returns the number of requests since the last update.getSize()
Returns the current size of the connection pool.The last update time.toString()
void
update()
Updates the JMX statistics.
-
Constructor Details
-
JMXConnectionPool
Initializes the bean.- Parameters:
code
- the application codepool
- the JDBC connection pool
-
-
Method Details
-
getSize
Description copied from interface:ConnectionPoolMXBean
Returns the current size of the connection pool.- Specified by:
getSize
in interfaceConnectionPoolMXBean
- Returns:
- the number of connections
-
getRequests
Description copied from interface:ConnectionPoolMXBean
Returns the number of requests since the last update.- Specified by:
getRequests
in interfaceConnectionPoolMXBean
- Returns:
- the number of connection pool requests
-
getPoolInfo
Description copied from interface:ConnectionPoolMXBean
Returns a collection of connection information.- Specified by:
getPoolInfo
in interfaceConnectionPoolMXBean
- Returns:
- a Collection of ConnectionMBeans
-
getUpdateTime
Description copied from interface:ConnectionPoolMXBean
The last update time.- Specified by:
getUpdateTime
in interfaceConnectionPoolMXBean
- Returns:
- the update date/time
-
getMaxBorrowTime
Description copied from interface:ConnectionPoolMXBean
Returns the length of the maximum connection borrow time since the last refresh.- Specified by:
getMaxBorrowTime
in interfaceConnectionPoolMXBean
- Returns:
- the borrow time in milliseconds
-
getMaxWaitTime
Description copied from interface:ConnectionPoolMXBean
Returns the length of the maximum connection wait time since the last refresh.- Specified by:
getMaxWaitTime
in interfaceConnectionPoolMXBean
- Returns:
- the wait time in milliseconds
-
update
public void update()Description copied from interface:JMXRefresh
Updates the JMX statistics.- Specified by:
update
in interfaceJMXRefresh
-
toString
-