Class Semaphore

  • Direct Known Subclasses:
    BinarySemaphore

    public abstract class Semaphore
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String REVISION  
      protected int value  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Semaphore()  
      protected Semaphore​(int initial)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void interruptibleP()  
      void P()  
      java.lang.String toString()  
      void V()  
      int value()  
      • Methods inherited from class java.lang.Object

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

      • value

        protected int value
    • Constructor Detail

      • Semaphore

        protected Semaphore()
      • Semaphore

        protected Semaphore​(int initial)
    • Method Detail

      • P

        public void P()
      • V

        public void V()
      • value

        public int value()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • interruptibleP

        public void interruptibleP()
                            throws java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException