Package dev.shamoo.runtime.core
Record Class InvocationSnapshot
java.lang.Object
java.lang.Record
dev.shamoo.runtime.core.InvocationSnapshot
public record InvocationSnapshot(boolean accepting, int active, long admitted, long completed, long rejected)
extends Record
Immutable invocation admission counters.
-
Constructor Summary
ConstructorsConstructorDescriptionInvocationSnapshot(boolean accepting, int active, long admitted, long completed, long rejected) Creates an instance of aInvocationSnapshotrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theacceptingrecord component.intactive()Returns the value of theactiverecord component.longadmitted()Returns the value of theadmittedrecord component.longReturns the value of thecompletedrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longrejected()Returns the value of therejectedrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
InvocationSnapshot
public InvocationSnapshot(boolean accepting, int active, long admitted, long completed, long rejected) Creates an instance of aInvocationSnapshotrecord class.- Parameters:
accepting- the value for theacceptingrecord componentactive- the value for theactiverecord componentadmitted- the value for theadmittedrecord componentcompleted- the value for thecompletedrecord componentrejected- the value for therejectedrecord 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 '=='. -
accepting
public boolean accepting()Returns the value of theacceptingrecord component.- Returns:
- the value of the
acceptingrecord component
-
active
public int active()Returns the value of theactiverecord component.- Returns:
- the value of the
activerecord component
-
admitted
public long admitted()Returns the value of theadmittedrecord component.- Returns:
- the value of the
admittedrecord component
-
completed
public long completed()Returns the value of thecompletedrecord component.- Returns:
- the value of the
completedrecord component
-
rejected
public long rejected()Returns the value of therejectedrecord component.- Returns:
- the value of the
rejectedrecord component
-