Package org.attribyte.sql.pool
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
Statistics for this segment.
-
Method Summary
Modifier and TypeMethodDescriptionlongGets the count of connections closed when active limit is reached.longGets the connection count.longGets the cumulative time this segment has been active.longGets the count of failed connection errors.longGets the time this segment was last activated.longGets the last time this segment was deactivated.Gets the name of the segment.final doubleGets the fraction of the total uptime this segment has been active.booleanisActive()Determines if this segment is currently active.
-
Method Details
-
getMetrics
- Specified by:
getMetricsin interfacecom.codahale.metrics.MetricSet
-
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.
-