Package org.microproxy
Record Class PoolMetrics
java.lang.Object
java.lang.Record
org.microproxy.PoolMetrics
- Record Components:
totalConnections- pooled connections alive, leased or idleactiveConnections- connections currently leased to a request or sessionidleConnections- connections waiting in the poolborrowCount- leases granted (reused or newly created)returnCount- connections returned to the poolevictionCount- idle connections closed for idle timeout or to make roomvalidationFailureCount- idle connections found closed when about to be reused
public record PoolMetrics(int totalConnections, int activeConnections, int idleConnections, long borrowCount, long returnCount, long evictionCount, long validationFailureCount)
extends Record
A snapshot of the shared server connection pool.
-
Constructor Summary
ConstructorsConstructorDescriptionPoolMetrics(int totalConnections, int activeConnections, int idleConnections, long borrowCount, long returnCount, long evictionCount, long validationFailureCount) Creates an instance of aPoolMetricsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theactiveConnectionsrecord component.longReturns the value of theborrowCountrecord component.final booleanIndicates whether some other object is "equal to" this one.longReturns the value of theevictionCountrecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of theidleConnectionsrecord component.longReturns the value of thereturnCountrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thetotalConnectionsrecord component.longReturns the value of thevalidationFailureCountrecord component.
-
Constructor Details
-
PoolMetrics
public PoolMetrics(int totalConnections, int activeConnections, int idleConnections, long borrowCount, long returnCount, long evictionCount, long validationFailureCount) Creates an instance of aPoolMetricsrecord class.- Parameters:
totalConnections- the value for thetotalConnectionsrecord componentactiveConnections- the value for theactiveConnectionsrecord componentidleConnections- the value for theidleConnectionsrecord componentborrowCount- the value for theborrowCountrecord componentreturnCount- the value for thereturnCountrecord componentevictionCount- the value for theevictionCountrecord componentvalidationFailureCount- the value for thevalidationFailureCountrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
totalConnections
public int totalConnections()Returns the value of thetotalConnectionsrecord component.- Returns:
- the value of the
totalConnectionsrecord component
-
activeConnections
public int activeConnections()Returns the value of theactiveConnectionsrecord component.- Returns:
- the value of the
activeConnectionsrecord component
-
idleConnections
public int idleConnections()Returns the value of theidleConnectionsrecord component.- Returns:
- the value of the
idleConnectionsrecord component
-
borrowCount
public long borrowCount()Returns the value of theborrowCountrecord component.- Returns:
- the value of the
borrowCountrecord component
-
returnCount
public long returnCount()Returns the value of thereturnCountrecord component.- Returns:
- the value of the
returnCountrecord component
-
evictionCount
public long evictionCount()Returns the value of theevictionCountrecord component.- Returns:
- the value of the
evictionCountrecord component
-
validationFailureCount
public long validationFailureCount()Returns the value of thevalidationFailureCountrecord component.- Returns:
- the value of the
validationFailureCountrecord component
-