Record Class MutexKeyBody
java.lang.Object
java.lang.Record
org.ek9lang.compiler.phase5.lockanalysis.MutexKeyBody
- Record Components:
stableId- wire-form identifier.keyFunction- the dynamic function symbol (the lambda itself). Navigation target for "jump to the MutexKey body."declarationLocation- source token of the(captures) is MutexKey of T as functiondeclaration.enclosingFunction- the function/method that syntactically contains the lambda. Navigation target for "jump to the enclosing function."outerLockIdentityId- FK intoLockAnalysis.identitiesById()— the lock this key body wraps.
public record MutexKeyBody(String stableId, ISymbol keyFunction, IToken declarationLocation, ISymbol enclosingFunction, String outerLockIdentityId)
extends Record
A
MutexKey dynamic-function body — the lambda passed as the argument to
enter(...) or tryEnter(...).
Each MutexKey body protects the lock identified by outerLockIdentityId;
its body executes with that lock held on the calling thread.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedeclarationLocationrecord component.Returns the value of theenclosingFunctionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thekeyFunctionrecord component.Returns the value of theouterLockIdentityIdrecord component.stableId()Returns the value of thestableIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MutexKeyBody
public MutexKeyBody(String stableId, ISymbol keyFunction, IToken declarationLocation, ISymbol enclosingFunction, String outerLockIdentityId) Creates an instance of aMutexKeyBodyrecord class.- Parameters:
stableId- the value for thestableIdrecord componentkeyFunction- the value for thekeyFunctionrecord componentdeclarationLocation- the value for thedeclarationLocationrecord componentenclosingFunction- the value for theenclosingFunctionrecord componentouterLockIdentityId- the value for theouterLockIdentityIdrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 withObjects::equals(Object,Object). -
stableId
-
keyFunction
Returns the value of thekeyFunctionrecord component.- Returns:
- the value of the
keyFunctionrecord component
-
declarationLocation
Returns the value of thedeclarationLocationrecord component.- Returns:
- the value of the
declarationLocationrecord component
-
enclosingFunction
Returns the value of theenclosingFunctionrecord component.- Returns:
- the value of the
enclosingFunctionrecord component
-
outerLockIdentityId
Returns the value of theouterLockIdentityIdrecord component.- Returns:
- the value of the
outerLockIdentityIdrecord component
-