Record Class PoolInfo.PoolStats
java.lang.Object
java.lang.Record
io.micronaut.controlpanel.panels.datasource.model.PoolInfo.PoolStats
- Record Components:
active- Active borrowed connectionsidle- Idle available connectionstotal- Total open connectionsmax- Maximum configured connectionsmin- Minimum configured connectionsawaiting- Threads or requests waiting for a connectionactiveWidth- Active segment width for the status baridleWidth- Idle segment width for the status barremainingWidth- Remaining capacity segment width for the status barusageLabel- Human-readable usage label
- Enclosing class:
PoolInfo
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintactive()Returns the value of theactiverecord component.Returns the value of theactiveWidthrecord component.intawaiting()Returns the value of theawaitingrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanfinal inthashCode()Returns a hash code value for this object.intidle()Returns the value of theidlerecord component.Returns the value of theidleWidthrecord component.intmax()Returns the value of themaxrecord component.intmin()Returns the value of theminrecord component.static PoolInfo.PoolStatsof(int active, int idle, int total, int max, int min, int awaiting) Returns the value of theremainingWidthrecord component.final StringtoString()Returns a string representation of this record class.inttotal()Returns the value of thetotalrecord component.Returns the value of theusageLabelrecord component.
-
Constructor Details
-
PoolStats
public PoolStats(int active, int idle, int total, int max, int min, int awaiting, String activeWidth, String idleWidth, String remainingWidth, String usageLabel) Creates an instance of aPoolStatsrecord class.- Parameters:
active- the value for theactiverecord componentidle- the value for theidlerecord componenttotal- the value for thetotalrecord componentmax- the value for themaxrecord componentmin- the value for theminrecord componentawaiting- the value for theawaitingrecord componentactiveWidth- the value for theactiveWidthrecord componentidleWidth- the value for theidleWidthrecord componentremainingWidth- the value for theremainingWidthrecord componentusageLabel- the value for theusageLabelrecord component
-
-
Method Details
-
of
public static PoolInfo.PoolStats of(int active, int idle, int total, int max, int min, int awaiting) -
hasCapacity
public boolean hasCapacity() -
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
active
-
idle
-
total
-
max
-
min
-
awaiting
-
activeWidth
Returns the value of theactiveWidthrecord component.- Returns:
- the value of the
activeWidthrecord component
-
idleWidth
-
remainingWidth
Returns the value of theremainingWidthrecord component.- Returns:
- the value of the
remainingWidthrecord component
-
usageLabel
Returns the value of theusageLabelrecord component.- Returns:
- the value of the
usageLabelrecord component
-