Interface RegionStateNodeLock.QueueEntry

Enclosing class:
RegionStateNodeLock

private static interface RegionStateNodeLock.QueueEntry
This is for abstraction the common lock/unlock logic for both Thread and Procedure.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Called when we can not hold the lock and should wait.
    A thread, or a procedure.
    void
    Called when it is your turn to get the lock.
  • Method Details

    • getOwner

      A thread, or a procedure.
    • await

      Called when we can not hold the lock and should wait. For thread, you should wait on a condition, and for procedure, a ProcedureSuspendedException should be thrown.
      Throws:
      ProcedureSuspendedException
    • signal

      void signal()
      Called when it is your turn to get the lock. For thread, just delegate the call to condition's signal method, and for procedure, you should call the wakeUp action, to add the procedure back to procedure scheduler.