Class ConnectionPoolMonitor

java.lang.Object
is.codion.tools.monitor.model.ConnectionPoolMonitor

public final class ConnectionPoolMonitor extends Object
A ConnectionPoolMonitor
  • Constructor Details

    • ConnectionPoolMonitor

      public ConnectionPoolMonitor(ConnectionPoolWrapper connectionPool, int updateRate)
      Instantiates a new ConnectionPoolMonitor
      Parameters:
      connectionPool - the connection pool to monitor
      updateRate - the initial statistics update rate in seconds
  • Method Details

    • username

      public String username()
      Returns:
      the user the connection pool is based on
    • connectionPoolStatistics

      public ConnectionPoolStatistics connectionPoolStatistics()
      Returns:
      the latest pool statistics
    • pooledConnectionTimeout

      public Value<Integer> pooledConnectionTimeout()
      Returns:
      the pool connection timeout in milliseconds
    • poolCleanupInterval

      public Value<Integer> poolCleanupInterval()
      Returns:
      the pool maintenance interval in seconds
    • minimumPoolSize

      public Value<Integer> minimumPoolSize()
      Returns:
      the minimum pool size to maintain
    • maximumPoolSize

      public Value<Integer> maximumPoolSize()
      Returns:
      the maximum allowed pool size
    • maximumCheckOutTime

      public Value<Integer> 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

      public State collectSnapshotStatistics()
      Returns:
      the State controlling whether snapshot statistics are collected
    • collectCheckOutTimes

      public State collectCheckOutTimes()
      Returns:
      the State controlling whether checkout times are collected
    • statisticsUpdated

      public Observer<?> statisticsUpdated()
      Returns:
      an observer notified each time the statistics are updated
    • updateInterval

      public Value<Integer> updateInterval()
      Returns:
      the Value controlling the update interval
    • shutdown

      public void shutdown()
      Shuts down this pool monitor