Package is.codion.tools.monitor.model
Class ConnectionPoolMonitor
java.lang.Object
is.codion.tools.monitor.model.ConnectionPoolMonitor
A ConnectionPoolMonitor
-
Constructor Summary
ConstructorDescriptionConnectionPoolMonitor
(ConnectionPoolWrapper connectionPool, int updateRate) Instantiates a newConnectionPoolMonitor
-
Method Summary
Modifier and TypeMethodDescriptionorg.jfree.data.xy.IntervalXYDataset
void
Clears all graph data setsboolean
org.jfree.data.xy.XYDataset
org.jfree.data.xy.XYDataset
void
Resets all collected pool statisticsvoid
shutdown()
Shuts down this pool monitororg.jfree.data.xy.XYDataset
Observer<?>
username()
-
Constructor Details
-
ConnectionPoolMonitor
Instantiates a newConnectionPoolMonitor
- Parameters:
connectionPool
- the connection pool to monitorupdateRate
- the initial statistics update rate in seconds
-
-
Method Details
-
username
- Returns:
- the user the connection pool is based on
-
connectionPoolStatistics
- Returns:
- the latest pool statistics
-
pooledConnectionTimeout
- Returns:
- the pool connection timeout in milliseconds
-
poolCleanupInterval
- Returns:
- the pool maintenance interval in seconds
-
minimumPoolSize
- Returns:
- the minimum pool size to maintain
-
maximumPoolSize
- Returns:
- the maximum allowed pool size
-
maximumCheckOutTime
- Returns:
- the maximum wait time for a connection
-
datasetContainsData
public boolean datasetContainsData()- Returns:
- true if the graph datasets contain data
-
snapshotDataset
public org.jfree.data.xy.XYDataset snapshotDataset()- Returns:
- the dataset for snapshot pool stats
-
inPoolDataset
public org.jfree.data.xy.XYDataset inPoolDataset()- Returns:
- the dataset for the number of connections in the pool
-
requestsPerSecondDataset
public org.jfree.data.xy.XYDataset requestsPerSecondDataset()- Returns:
- the dataset for the number of connection requests per second
-
checkOutTimeCollection
public org.jfree.data.xy.IntervalXYDataset checkOutTimeCollection()- Returns:
- the dataset for the connection check out time
-
resetStatistics
public void resetStatistics()Resets all collected pool statistics -
clearStatistics
public void clearStatistics()Clears all graph data sets -
collectSnapshotStatistics
- Returns:
- the
State
controlling whether snapshot statistics are collected
-
collectCheckOutTimes
- Returns:
- the
State
controlling whether checkout times are collected
-
statisticsUpdated
- Returns:
- an observer notified each time the statistics are updated
-
updateInterval
- Returns:
- the
Value
controlling the update interval
-
shutdown
public void shutdown()Shuts down this pool monitor
-