Package com.tnsai.coordination.pool
Record Class PoolMetrics
java.lang.Object
java.lang.Record
com.tnsai.coordination.pool.PoolMetrics
- Record Components:
active- number of currently checked-out agentsidle- number of currently idle agentstotalCreated- total agents created since pool inceptiontotalDestroyed- total agents destroyed since pool inceptionpeakActive- highest number of simultaneously active agents
public record PoolMetrics(int active, int idle, int totalCreated, int totalDestroyed, int peakActive)
extends Record
Snapshot of pool statistics.
-
Constructor Summary
ConstructorsConstructorDescriptionPoolMetrics(int active, int idle, int totalCreated, int totalDestroyed, int peakActive) Creates an instance of aPoolMetricsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintactive()Returns the value of theactiverecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intidle()Returns the value of theidlerecord component.intReturns the value of thepeakActiverecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thetotalCreatedrecord component.intReturns the value of thetotalDestroyedrecord component.
-
Constructor Details
-
PoolMetrics
public PoolMetrics(int active, int idle, int totalCreated, int totalDestroyed, int peakActive) Creates an instance of aPoolMetricsrecord class.- Parameters:
active- the value for theactiverecord componentidle- the value for theidlerecord componenttotalCreated- the value for thetotalCreatedrecord componenttotalDestroyed- the value for thetotalDestroyedrecord componentpeakActive- the value for thepeakActiverecord 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 '=='. -
active
public int active()Returns the value of theactiverecord component.- Returns:
- the value of the
activerecord component
-
idle
public int idle()Returns the value of theidlerecord component.- Returns:
- the value of the
idlerecord component
-
totalCreated
public int totalCreated()Returns the value of thetotalCreatedrecord component.- Returns:
- the value of the
totalCreatedrecord component
-
totalDestroyed
public int totalDestroyed()Returns the value of thetotalDestroyedrecord component.- Returns:
- the value of the
totalDestroyedrecord component
-
peakActive
public int peakActive()Returns the value of thepeakActiverecord component.- Returns:
- the value of the
peakActiverecord component
-