Package org.zeromq

Class ZLoop


  • public class ZLoop
    extends java.lang.Object
    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.
    • Field Detail

      • pollSize

        private int pollSize
      • dirty

        private boolean dirty
      • verbose

        private boolean verbose
      • zombies

        private final java.util.List<java.lang.Object> zombies
      • newTimers

        private final java.util.List<ZLoop.STimer> newTimers
    • Method Detail

      • destroy

        @Deprecated
        public void destroy()
        Deprecated.
        no-op behaviour
      • rebuild

        private void rebuild()
      • ticklessTimer

        private long ticklessTimer()
      • removePoller

        public void removePoller​(ZMQ.PollItem pollItem)
      • addTimer

        public int addTimer​(int delay,
                            int times,
                            ZLoop.IZLoopHandler handler,
                            java.lang.Object arg)
      • removeTimer

        public int removeTimer​(java.lang.Object arg)
      • verbose

        public void verbose​(boolean verbose)
      • start

        public int start()