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:
- 12.1
- Author:
- Luke
-
Constructor Summary
ConstructorsConstructorDescriptionJMXConnectionPool(String code, org.gvagroup.pool.ConnectionPool<?> pool) Initializes the bean. -
Method Summary
Modifier and TypeMethodDescriptiongetCode()Returns the connection pool code.Returns 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()voidupdate()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:ConnectionPoolMXBeanReturns the current size of the connection pool.- Specified by:
getSizein interfaceConnectionPoolMXBean- Returns:
- the number of connections
-
getCode
Description copied from interface:ConnectionPoolMXBeanReturns the connection pool code.- Specified by:
getCodein interfaceConnectionPoolMXBean- Returns:
- the code
-
getRequests
Description copied from interface:ConnectionPoolMXBeanReturns the number of requests since the last update.- Specified by:
getRequestsin interfaceConnectionPoolMXBean- Returns:
- the number of connection pool requests
-
getPoolInfo
Description copied from interface:ConnectionPoolMXBeanReturns a collection of connection information.- Specified by:
getPoolInfoin interfaceConnectionPoolMXBean- Returns:
- a Collection of ConnectionMBeans
-
getUpdateTime
Description copied from interface:ConnectionPoolMXBeanThe last update time.- Specified by:
getUpdateTimein interfaceConnectionPoolMXBean- Returns:
- the update date/time
-
getMaxBorrowTime
Description copied from interface:ConnectionPoolMXBeanReturns the length of the maximum connection borrow time since the last refresh.- Specified by:
getMaxBorrowTimein interfaceConnectionPoolMXBean- Returns:
- the borrow time in milliseconds
-
getMaxWaitTime
Description copied from interface:ConnectionPoolMXBeanReturns the length of the maximum connection wait time since the last refresh.- Specified by:
getMaxWaitTimein interfaceConnectionPoolMXBean- Returns:
- the wait time in milliseconds
-
update
public void update()Description copied from interface:JMXRefreshUpdates the JMX statistics.- Specified by:
updatein interfaceJMXRefresh
-
toString
-