Record Class DeadlockDetector.DetectionResult
java.lang.Object
java.lang.Record
com.tnsai.coordination.choreography.DeadlockDetector.DetectionResult
- Enclosing class:
DeadlockDetector
public static record DeadlockDetector.DetectionResult(List<DeadlockDetector.Cycle> cycles, boolean hasDeadlock)
extends Record
Result of deadlock detection.
-
Constructor Summary
ConstructorsConstructorDescriptionDetectionResult(List<DeadlockDetector.Cycle> cycles, boolean hasDeadlock) Creates an instance of aDetectionResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncycles()Returns the value of thecyclesrecord component.deadlocked(List<DeadlockDetector.Cycle> cycles) final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of thehasDeadlockrecord component.final inthashCode()Returns a hash code value for this object.safe()final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DetectionResult
Creates an instance of aDetectionResultrecord class.- Parameters:
cycles- the value for thecyclesrecord componenthasDeadlock- the value for thehasDeadlockrecord component
-
-
Method Details
-
safe
-
deadlocked
-
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 '=='. -
cycles
Returns the value of thecyclesrecord component.- Returns:
- the value of the
cyclesrecord component
-
hasDeadlock
public boolean hasDeadlock()Returns the value of thehasDeadlockrecord component.- Returns:
- the value of the
hasDeadlockrecord component
-