Record Class DeadlockChain

java.lang.Object
java.lang.Record
org.ek9lang.compiler.phase5.lockanalysis.DeadlockChain
Record Components:
errorCode - "E08252" or "E08253".
steps - ordered chain steps with full hyperlink data for IDE.
outerLockIdentityId - FK into LockAnalysis.identitiesById() — the outer lock held when the cycle starts.
innerLockIdentityId - FK into LockAnalysis.identitiesById() — the inner lock that closes the cycle.
path - composed edge kind across the reaching call path — EdgeKind.SAME_THREAD or EdgeKind.CROSS_THREAD.

public record DeadlockChain(String errorCode, List<ChainStep> steps, String outerLockIdentityId, String innerLockIdentityId, EdgeKind path) extends Record
Full rationale for a single detected deadlock — either E08252 (nested enter on different lock identity) or E08253 (cross-thread same lock).

The steps list is ordered from outer to inner: position 0 is the outermost enter() or KEY_BODY_ENTRY; the final step is the inner enter() site whose acquisition completes the cycle. Intermediate steps are StepKind.CALL and StepKind.CROSS_THREAD_BOUNDARY transitions along the reaching call path.

  • Constructor Details

    • DeadlockChain

      public DeadlockChain(String errorCode, List<ChainStep> steps, String outerLockIdentityId, String innerLockIdentityId, EdgeKind path)
      Creates an instance of a DeadlockChain record class.
      Parameters:
      errorCode - the value for the errorCode record component
      steps - the value for the steps record component
      outerLockIdentityId - the value for the outerLockIdentityId record component
      innerLockIdentityId - the value for the innerLockIdentityId record component
      path - the value for the path record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • errorCode

      public String errorCode()
      Returns the value of the errorCode record component.
      Returns:
      the value of the errorCode record component
    • steps

      public List<ChainStep> steps()
      Returns the value of the steps record component.
      Returns:
      the value of the steps record component
    • outerLockIdentityId

      public String outerLockIdentityId()
      Returns the value of the outerLockIdentityId record component.
      Returns:
      the value of the outerLockIdentityId record component
    • innerLockIdentityId

      public String innerLockIdentityId()
      Returns the value of the innerLockIdentityId record component.
      Returns:
      the value of the innerLockIdentityId record component
    • path

      public EdgeKind path()
      Returns the value of the path record component.
      Returns:
      the value of the path record component