Class ReclosableLatch

  • All Implemented Interfaces:

    public class ReclosableLatch
    extends 
    A thread gate, that uses an .

    This implementation allows you to create a latch with a default state (open or closed), and repeatedly open or close the latch.

    Since:
    4.0
    Author:
    Manik Surtani ([email protected])
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.util.concurrent.locks.

    • Constructor Detail

      • ReclosableLatch

        public ReclosableLatch()
      • ReclosableLatch

        public ReclosableLatch​(boolean defaultOpen)
    • Method Detail

      • tryAcquireShared

        public final int tryAcquireShared​(int ignored)
        Overrides:
         in class 
      • tryReleaseShared

        public final boolean tryReleaseShared​(int state)
        Overrides:
         in class 
      • open

        public final void open()
      • close

        public final void close()
      • isOpened

        public boolean isOpened()
      • await

        public final void await()
                         throws 
        Throws:
      • awaitUninterruptibly

        public final void awaitUninterruptibly()
      • await

        public final boolean await​(long time,
                                    unit)
                            throws 
        Throws:
      • toString

        public  toString()
        Overrides:
         in class