Class Monitor.Guard

    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) java.util.concurrent.locks.Condition condition  
      (package private) Monitor monitor  
      (package private) Monitor.Guard next
      The next active guard
      (package private) int waiterCount  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Guard​(Monitor monitor)  
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract boolean isSatisfied()
      Evaluates this guard's boolean condition.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • condition

        final java.util.concurrent.locks.Condition condition
      • waiterCount

        int waiterCount
    • Constructor Detail

      • Guard

        protected Guard​(Monitor monitor)
    • Method Detail

      • isSatisfied

        public abstract boolean isSatisfied()
        Evaluates this guard's boolean condition. This method is always called with the associated monitor already occupied. Implementations of this method must depend only on state protected by the associated monitor, and must not modify that state.