Package org.zeromq

Class ZStar.Plateau

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.concurrent.CountDownLatch exit  
      private int number  
      private static java.util.concurrent.atomic.AtomicInteger shows  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Plateau()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void await()
      Causes the current thread to wait in blocking mode until the end of the remote operations, unless the thread is interrupted.
      boolean await​(long timeout, java.util.concurrent.TimeUnit unit)
      Causes the current thread to wait in blocking mode until the end of the remote operations, unless the thread is interrupted, or the specified waiting time elapses.
      void awaitSilent()
      Causes the current thread to wait in blocking mode until the end of the remote operations.
      boolean isExited()
      Checks in non-blocking mode, if the remote operations have ended.
      void run​(java.lang.Object[] train, ZContext chef, ZMQ.Socket mic)  
      private void showMustGoOn​(ZContext chef, ZStar.Set set, ZMQ.Socket phone, ZStar.Fortune fortune, java.lang.Object... bags)  
      • Methods inherited from class java.lang.Object

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

      • shows

        private static final java.util.concurrent.atomic.AtomicInteger shows
      • number

        private final int number
      • exit

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

      • Plateau

        private Plateau()
    • Method Detail

      • awaitSilent

        public void awaitSilent()
        Description copied from interface: ZStar.Exit
        Causes the current thread to wait in blocking mode until the end of the remote operations.
        Specified by:
        awaitSilent in interface ZStar.Exit
      • await

        public void await()
                   throws java.lang.InterruptedException
        Description copied from interface: ZStar.Exit
        Causes the current thread to wait in blocking mode until the end of the remote operations, unless the thread is interrupted.

        If the current thread:

        • has its interrupted status set on entry to this method; or
        • is interrupted while waiting,
        then InterruptedException is thrown and the current thread's interrupted status is cleared.
        Specified by:
        await in interface ZStar.Exit
        Throws:
        java.lang.InterruptedException - if the current thread is interrupted while waiting
      • await

        public boolean await​(long timeout,
                             java.util.concurrent.TimeUnit unit)
                      throws java.lang.InterruptedException
        Description copied from interface: ZStar.Exit
        Causes the current thread to wait in blocking mode until the end of the remote operations, unless the thread is interrupted, or the specified waiting time elapses.

        If the current thread:

        • has its interrupted status set on entry to this method; or
        • is interrupted while waiting,
        then InterruptedException is thrown and the current thread's interrupted status is cleared.

        If the specified waiting time elapses then the value false is returned. If the time is less than or equal to zero, the method will not wait at all.

        Specified by:
        await in interface ZStar.Exit
        Parameters:
        timeout - the maximum time to wait
        unit - the time unit of the timeout argument
        Returns:
        true if the remote operations ended and false if the waiting time elapsed before the remote operations ended
        Throws:
        java.lang.InterruptedException - if the current thread is interrupted while waiting
      • isExited

        public boolean isExited()
        Description copied from interface: ZStar.Exit
        Checks in non-blocking mode, if the remote operations have ended.
        Specified by:
        isExited in interface ZStar.Exit
        Returns:
        true if the runnable where the remote operations occurred if finished, otherwise false.