Record Class PoolInfo.PoolStats

java.lang.Object
java.lang.Record
io.micronaut.controlpanel.panels.datasource.model.PoolInfo.PoolStats
Record Components:
active - Active borrowed connections
idle - Idle available connections
total - Total open connections
max - Maximum configured connections
min - Minimum configured connections
awaiting - Threads or requests waiting for a connection
activeWidth - Active segment width for the status bar
idleWidth - Idle segment width for the status bar
remainingWidth - Remaining capacity segment width for the status bar
usageLabel - Human-readable usage label
Enclosing class:
PoolInfo

public static record PoolInfo.PoolStats(int active, int idle, int total, int max, int min, int awaiting, String activeWidth, String idleWidth, String remainingWidth, String usageLabel) extends Record
Connection pool status metrics.
  • 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 a PoolStats record class.
      Parameters:
      active - the value for the active record component
      idle - the value for the idle record component
      total - the value for the total record component
      max - the value for the max record component
      min - the value for the min record component
      awaiting - the value for the awaiting record component
      activeWidth - the value for the activeWidth record component
      idleWidth - the value for the idleWidth record component
      remainingWidth - the value for the remainingWidth record component
      usageLabel - the value for the usageLabel record 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

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • active

      public int active()
      Returns the value of the active record component.
      Returns:
      the value of the active record component
    • idle

      public int idle()
      Returns the value of the idle record component.
      Returns:
      the value of the idle record component
    • total

      public int total()
      Returns the value of the total record component.
      Returns:
      the value of the total record component
    • max

      public int max()
      Returns the value of the max record component.
      Returns:
      the value of the max record component
    • min

      public int min()
      Returns the value of the min record component.
      Returns:
      the value of the min record component
    • awaiting

      public int awaiting()
      Returns the value of the awaiting record component.
      Returns:
      the value of the awaiting record component
    • activeWidth

      public String activeWidth()
      Returns the value of the activeWidth record component.
      Returns:
      the value of the activeWidth record component
    • idleWidth

      public String idleWidth()
      Returns the value of the idleWidth record component.
      Returns:
      the value of the idleWidth record component
    • remainingWidth

      public String remainingWidth()
      Returns the value of the remainingWidth record component.
      Returns:
      the value of the remainingWidth record component
    • usageLabel

      public String usageLabel()
      Returns the value of the usageLabel record component.
      Returns:
      the value of the usageLabel record component