Module org.elasticsearch.server
Package org.elasticsearch.cluster
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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Constructor Summary
ConstructorsConstructorDescriptionThreadPoolUsageStats(int totalThreadPoolThreads, float averageThreadPoolUtilization, long maxThreadPoolQueueLatencyMillis) Creates an instance of aThreadPoolUsageStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatReturns the value of theaverageThreadPoolUtilizationrecord component.booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.longReturns the value of themaxThreadPoolQueueLatencyMillisrecord component.toString()Returns a string representation of this record class.intReturns the value of thetotalThreadPoolThreadsrecord component.voidwriteTo(StreamOutput out) Write this into the StreamOutput.
-
Constructor Details
-
ThreadPoolUsageStats
- Throws:
IOException
-
ThreadPoolUsageStats
public ThreadPoolUsageStats(int totalThreadPoolThreads, float averageThreadPoolUtilization, long maxThreadPoolQueueLatencyMillis) Creates an instance of aThreadPoolUsageStatsrecord class.- Parameters:
totalThreadPoolThreads- the value for thetotalThreadPoolThreadsrecord componentaverageThreadPoolUtilization- the value for theaverageThreadPoolUtilizationrecord componentmaxThreadPoolQueueLatencyMillis- the value for themaxThreadPoolQueueLatencyMillisrecord component
-
-
Method Details
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- 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. -
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. -
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 '=='. -
totalThreadPoolThreads
public int totalThreadPoolThreads()Returns the value of thetotalThreadPoolThreadsrecord component.- Returns:
- the value of the
totalThreadPoolThreadsrecord component
-
averageThreadPoolUtilization
public float averageThreadPoolUtilization()Returns the value of theaverageThreadPoolUtilizationrecord component.- Returns:
- the value of the
averageThreadPoolUtilizationrecord component
-
maxThreadPoolQueueLatencyMillis
public long maxThreadPoolQueueLatencyMillis()Returns the value of themaxThreadPoolQueueLatencyMillisrecord component.- Returns:
- the value of the
maxThreadPoolQueueLatencyMillisrecord component
-