Class ZStar.Plateau
java.lang.Object
org.zeromq.ZStar.Plateau
- All Implemented Interfaces:
ZStar.Exit, ZThread.IAttachedRunnable
- Enclosing class:
ZStar
private static final class ZStar.Plateau
extends Object
implements ZThread.IAttachedRunnable, ZStar.Exit
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CountDownLatchprivate final intprivate static final AtomicInteger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidawait()Causes the current thread to wait in blocking mode until the end of the remote operations, unless the thread is interrupted.booleanCauses 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.voidCauses the current thread to wait in blocking mode until the end of the remote operations.booleanisExited()Checks in non-blocking mode, if the remote operations have ended.voidrun(Object[] train, ZContext chef, ZMQ.Socket mic) private voidshowMustGoOn(ZContext chef, ZStar.Set set, ZMQ.Socket phone, ZStar.Fortune fortune, Object... bags)
-
Field Details
-
shows
-
number
private final int number -
exit
-
-
Constructor Details
-
Plateau
private Plateau()
-
-
Method Details
-
run
- Specified by:
runin interfaceZThread.IAttachedRunnable
-
showMustGoOn
private void showMustGoOn(ZContext chef, ZStar.Set set, ZMQ.Socket phone, ZStar.Fortune fortune, Object... bags) -
awaitSilent
public void awaitSilent()Description copied from interface:ZStar.ExitCauses the current thread to wait in blocking mode until the end of the remote operations.- Specified by:
awaitSilentin interfaceZStar.Exit
-
await
Description copied from interface:ZStar.ExitCauses 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,
InterruptedExceptionis thrown and the current thread's interrupted status is cleared.- Specified by:
awaitin interfaceZStar.Exit- Throws:
InterruptedException- if the current thread is interrupted while waiting
-
await
Description copied from interface:ZStar.ExitCauses 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,
InterruptedExceptionis thrown and the current thread's interrupted status is cleared.If the specified waiting time elapses then the value
falseis returned. If the time is less than or equal to zero, the method will not wait at all.- Specified by:
awaitin interfaceZStar.Exit- Parameters:
timeout- the maximum time to waitunit- the time unit of thetimeoutargument- Returns:
trueif the remote operations ended andfalseif the waiting time elapsed before the remote operations ended- Throws:
InterruptedException- if the current thread is interrupted while waiting
-
isExited
public boolean isExited()Description copied from interface:ZStar.ExitChecks in non-blocking mode, if the remote operations have ended.- Specified by:
isExitedin interfaceZStar.Exit- Returns:
- true if the runnable where the remote operations occurred if finished, otherwise false.
-