private static final class ZStar.Plateau extends java.lang.Object implements ZThread.IAttachedRunnable, ZStar.Exit
Modifier and Type | Field and Description |
---|---|
private java.util.concurrent.CountDownLatch |
exit |
private int |
number |
private static java.util.concurrent.atomic.AtomicInteger |
shows |
Modifier | Constructor and Description |
---|---|
private |
Plateau() |
Modifier and Type | Method and 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) |
private static final java.util.concurrent.atomic.AtomicInteger shows
private final int number
private final java.util.concurrent.CountDownLatch exit
public void run(java.lang.Object[] train, ZContext chef, ZMQ.Socket mic)
run
in interface ZThread.IAttachedRunnable
private void showMustGoOn(ZContext chef, ZStar.Set set, ZMQ.Socket phone, ZStar.Fortune fortune, java.lang.Object... bags)
public void awaitSilent()
ZStar.Exit
awaitSilent
in interface ZStar.Exit
public void await() throws java.lang.InterruptedException
ZStar.Exit
If the current thread:
InterruptedException
is thrown and the current thread's
interrupted status is cleared.await
in interface ZStar.Exit
java.lang.InterruptedException
- if the current thread is interrupted
while waitingpublic boolean await(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
ZStar.Exit
If the current thread:
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.
await
in interface ZStar.Exit
timeout
- the maximum time to waitunit
- the time unit of the timeout
argumenttrue
if the remote operations ended and false
if the waiting time elapsed before the remote operations endedjava.lang.InterruptedException
- if the current thread is interrupted
while waitingpublic boolean isExited()
ZStar.Exit
isExited
in interface ZStar.Exit