Package com.valhalla.sdk
Record Class SafeInterruptTelemetry.Snapshot
java.lang.Object
java.lang.Record
com.valhalla.sdk.SafeInterruptTelemetry.Snapshot
- Enclosing class:
SafeInterruptTelemetry
public static record SafeInterruptTelemetry.Snapshot(boolean requested, boolean safeToInterrupt, String reason)
extends Record
One normalized safe-interrupt observation emitted by the runtime.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanready()reason()Returns the value of thereasonrecord component.booleanReturns the value of therequestedrecord component.booleanReturns the value of thesafeToInterruptrecord component.final StringtoString()Returns a string representation of this record class.boolean
-
Constructor Details
-
Snapshot
Creates an instance of aSnapshotrecord class.- Parameters:
requested- the value for therequestedrecord componentsafeToInterrupt- the value for thesafeToInterruptrecord componentreason- the value for thereasonrecord component
-
-
Method Details
-
ready
public boolean ready()- Returns:
- true only after both a platform request and a safe gate sample
-
workInProgress
public boolean workInProgress()- Returns:
- whether the script currently owns indivisible work
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
requested
public boolean requested()Returns the value of therequestedrecord component.- Returns:
- the value of the
requestedrecord component
-
safeToInterrupt
public boolean safeToInterrupt()Returns the value of thesafeToInterruptrecord component.- Returns:
- the value of the
safeToInterruptrecord component
-
reason
Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-