Package org.zeromq
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 interface
private class
private class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ZMQ.Context
private boolean
private final List<ZLoop.STimer>
private ZLoop.SPoller[]
private final List<ZLoop.SPoller>
private ZMQ.Poller
private int
private final List<ZLoop.STimer>
private boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
addPoller
(ZMQ.PollItem pollItem, ZLoop.IZLoopHandler handler, Object arg) int
addTimer
(int delay, int times, ZLoop.IZLoopHandler handler, Object arg) void
destroy()
Deprecated.no-op behaviourprivate void
rebuild()
void
removePoller
(ZMQ.PollItem pollItem) int
removeTimer
(Object arg) int
start()
private long
void
verbose
(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()
-