Class Monitor


  • public class Monitor
    extends java.lang.Object
    Monitors.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      class  Monitor.Cond
      Conditions.
    • Constructor Summary

      Constructors 
      Constructor Description
      Monitor()
      Monitor constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void enter()
      Enters the monitor.
      void leave()
      Leaves the monitor.
      Monitor.Cond newCond()
      Returns a new condition associated to this monitor.
      void setMeanSleepAfterAwait​(int ms)
      If the parameter is greater than 0 more arbitrary interleavings will be introduced.
      • Methods inherited from class java.lang.Object

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

      • Monitor

        public Monitor()
        Monitor constructor. No additional initialization required.
    • Method Detail

      • setMeanSleepAfterAwait

        public void setMeanSleepAfterAwait​(int ms)
        If the parameter is greater than 0 more arbitrary interleavings will be introduced.
      • enter

        public void enter()
        Enters the monitor.
      • leave

        public void leave()
        Leaves the monitor.
      • newCond

        public Monitor.Cond newCond()
        Returns a new condition associated to this monitor.