Class ZLoop
java.lang.Object
org.zeromq.ZLoop
The ZLoop class provides an event-driven reactor pattern. The reactor
handles zmq.PollItem items (pollers or writers, sockets or fds), and
once-off or repeated timers. Its resolution is 1 msec. It uses a tickless
timer to reduce CPU interrupts in inactive processes.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceprivate classprivate class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ZMQ.Contextprivate booleanprivate final List<ZLoop.STimer> private ZLoop.SPoller[]private final List<ZLoop.SPoller> private ZMQ.Pollerprivate intprivate final List<ZLoop.STimer> private boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintaddPoller(ZMQ.PollItem pollItem, ZLoop.IZLoopHandler handler, Object arg) intaddTimer(int delay, int times, ZLoop.IZLoopHandler handler, Object arg) voiddestroy()Deprecated.no-op behaviourprivate voidrebuild()voidremovePoller(ZMQ.PollItem pollItem) intremoveTimer(Object arg) intstart()private longvoidverbose(boolean verbose)
-
Field Details
-
context
-
pollers
-
timers
-
pollSize
private int pollSize -
pollset
-
pollact
-
dirty
private boolean dirty -
verbose
private boolean verbose -
zombies
-
newTimers
-
-
Constructor Details
-
ZLoop
-
ZLoop
-
-
Method Details
-
destroy
Deprecated.no-op behaviour -
rebuild
private void rebuild() -
ticklessTimer
private long ticklessTimer() -
addPoller
-
removePoller
-
addTimer
-
removeTimer
-
verbose
public void verbose(boolean verbose) -
start
public int start()
-