Record Class NodeUsageStatsForThreadPools.ThreadPoolUsageStats

java.lang.Object
java.lang.Record
org.elasticsearch.cluster.NodeUsageStatsForThreadPools.ThreadPoolUsageStats
Record Components:
totalThreadPoolThreads - Total number of threads in the thread pool.
averageThreadPoolUtilization - Percent of thread pool threads that are in use, averaged over some period of time.
maxThreadPoolQueueLatencyMillis - The max time any task has spent in the thread pool queue. Zero if no task is queued.
All Implemented Interfaces:
Writeable
Enclosing class:
NodeUsageStatsForThreadPools

public static record NodeUsageStatsForThreadPools.ThreadPoolUsageStats(int totalThreadPoolThreads, float averageThreadPoolUtilization, long maxThreadPoolQueueLatencyMillis) extends Record implements Writeable
Record of usage stats for a thread pool.
  • Constructor Details

    • ThreadPoolUsageStats

      public ThreadPoolUsageStats(StreamInput in) throws IOException
      Throws:
      IOException
    • ThreadPoolUsageStats

      public ThreadPoolUsageStats(int totalThreadPoolThreads, float averageThreadPoolUtilization, long maxThreadPoolQueueLatencyMillis)
      Creates an instance of a ThreadPoolUsageStats record class.
      Parameters:
      totalThreadPoolThreads - the value for the totalThreadPoolThreads record component
      averageThreadPoolUtilization - the value for the averageThreadPoolUtilization record component
      maxThreadPoolQueueLatencyMillis - the value for the maxThreadPoolQueueLatencyMillis record component
  • Method Details

    • writeTo

      public void writeTo(StreamOutput out) throws IOException
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Specified by:
      writeTo in interface Writeable
      Throws:
      IOException
    • hashCode

      public 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
    • toString

      public 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
    • equals

      public 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. All components in this record class are compared with '=='.
      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.
    • totalThreadPoolThreads

      public int totalThreadPoolThreads()
      Returns the value of the totalThreadPoolThreads record component.
      Returns:
      the value of the totalThreadPoolThreads record component
    • averageThreadPoolUtilization

      public float averageThreadPoolUtilization()
      Returns the value of the averageThreadPoolUtilization record component.
      Returns:
      the value of the averageThreadPoolUtilization record component
    • maxThreadPoolQueueLatencyMillis

      public long maxThreadPoolQueueLatencyMillis()
      Returns the value of the maxThreadPoolQueueLatencyMillis record component.
      Returns:
      the value of the maxThreadPoolQueueLatencyMillis record component