Class ConnectionPoolSegment.Stats

java.lang.Object
org.attribyte.sql.pool.ConnectionPoolSegment.Stats
All Implemented Interfaces:
com.codahale.metrics.Metric, com.codahale.metrics.MetricSet
Enclosing class:
ConnectionPoolSegment

public class ConnectionPoolSegment.Stats extends Object implements com.codahale.metrics.MetricSet
Statistics for this segment.
  • Method Details

    • getMetrics

      public Map<String,com.codahale.metrics.Metric> getMetrics()
      Specified by:
      getMetrics in interface com.codahale.metrics.MetricSet
    • getSegmentName

      public String getSegmentName()
      Gets the name of the segment.
      Returns:
      The segment name.
    • getConnectionCount

      public long getConnectionCount()
      Gets the connection count.
      Returns:
      The connection count.
    • getFailedConnectionErrorCount

      public long getFailedConnectionErrorCount()
      Gets the count of failed connection errors.
      Returns:
      The connection error count.
    • getActiveTimeoutCount

      public long getActiveTimeoutCount()
      Gets the count of connections closed when active limit is reached.
      Returns:
      The active timeout count.
    • getLastActivatedTime

      public long getLastActivatedTime()
      Gets the time this segment was last activated.
      Returns:
      The last activated time.
    • getCumulativeActiveTimeMillis

      public long getCumulativeActiveTimeMillis()
      Gets the cumulative time this segment has been active.
      Returns:
      The cumulative active time.
    • getLastDeactivateTime

      public long getLastDeactivateTime()
      Gets the last time this segment was deactivated.
      Returns:
      The last deactivate time.
    • isActive

      public boolean isActive()
      Determines if this segment is currently active.
      Returns:
      Is the segment active?
    • getUptimeActiveFraction

      public final double getUptimeActiveFraction()
      Gets the fraction of the total uptime this segment has been active.
      Returns:
      The fraction.