Class SigIntBarrier


  • public class SigIntBarrier
    extends java.lang.Object
    One time barrier for blocking one or more threads until a SIGINT signal is received from the operating system or by programmatically calling signal().
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.concurrent.CountDownLatch latch  
    • Constructor Summary

      Constructors 
      Constructor Description
      SigIntBarrier()
      Construct and register the barrier ready for use.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void await()
      Await the reception of the SIGINT signal.
      void signal()
      Programmatically signal awaiting threads.
      • Methods inherited from class java.lang.Object

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

      • latch

        private final java.util.concurrent.CountDownLatch latch
    • Constructor Detail

      • SigIntBarrier

        public SigIntBarrier()
        Construct and register the barrier ready for use.
    • Method Detail

      • signal

        public void signal()
        Programmatically signal awaiting threads.
      • await

        public void await()
        Await the reception of the SIGINT signal.