Package com.tnsai.thread
Record Class ThreadManager.ThreadStats
java.lang.Object
java.lang.Record
com.tnsai.thread.ThreadManager.ThreadStats
- Enclosing class:
ThreadManager
public static record ThreadManager.ThreadStats(long total, long active, long running, long paused, long completed, long failed, long totalTokens)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionThreadStats(long total, long active, long running, long paused, long completed, long failed, long totalTokens) Creates an instance of aThreadStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongactive()Returns the value of theactiverecord component.longReturns the value of thecompletedrecord component.final booleanIndicates whether some other object is "equal to" this one.longfailed()Returns the value of thefailedrecord component.final inthashCode()Returns a hash code value for this object.longpaused()Returns the value of thepausedrecord component.longrunning()Returns the value of therunningrecord component.final StringtoString()Returns a string representation of this record class.longtotal()Returns the value of thetotalrecord component.longReturns the value of thetotalTokensrecord component.
-
Constructor Details
-
ThreadStats
public ThreadStats(long total, long active, long running, long paused, long completed, long failed, long totalTokens) Creates an instance of aThreadStatsrecord class.- Parameters:
total- the value for thetotalrecord componentactive- the value for theactiverecord componentrunning- the value for therunningrecord componentpaused- the value for thepausedrecord componentcompleted- the value for thecompletedrecord componentfailed- the value for thefailedrecord componenttotalTokens- the value for thetotalTokensrecord 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 '=='. -
total
public long total()Returns the value of thetotalrecord component.- Returns:
- the value of the
totalrecord component
-
active
public long active()Returns the value of theactiverecord component.- Returns:
- the value of the
activerecord component
-
running
public long running()Returns the value of therunningrecord component.- Returns:
- the value of the
runningrecord component
-
paused
public long paused()Returns the value of thepausedrecord component.- Returns:
- the value of the
pausedrecord component
-
completed
public long completed()Returns the value of thecompletedrecord component.- Returns:
- the value of the
completedrecord component
-
failed
public long failed()Returns the value of thefailedrecord component.- Returns:
- the value of the
failedrecord component
-
totalTokens
public long totalTokens()Returns the value of thetotalTokensrecord component.- Returns:
- the value of the
totalTokensrecord component
-