Package zmq

Class Signaler

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    final class Signaler
    extends java.lang.Object
    implements java.io.Closeable
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      private static interface  Signaler.IoOperation<O>  
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Ctx ctx  
      private Errno errno  
      private int pid  
      private java.nio.channels.Pipe.SourceChannel r  
      private long rcursor  
      private java.nio.ByteBuffer rdummy  
      private java.nio.channels.Selector selector  
      private java.nio.channels.Pipe.SinkChannel w  
      private java.util.concurrent.atomic.AtomicLong wcursor  
      private java.nio.ByteBuffer wdummy  
    • Constructor Summary

      Constructors 
      Constructor Description
      Signaler​(Ctx ctx, int pid, Errno errno)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      (package private) java.nio.channels.SelectableChannel getFd()  
      private <O> O maksInterrupt​(Signaler.IoOperation<O> operation)  
      (package private) void recv()  
      (package private) void send()  
      java.lang.String toString()  
      (package private) boolean waitEvent​(long timeout)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • w

        private final java.nio.channels.Pipe.SinkChannel w
      • r

        private final java.nio.channels.Pipe.SourceChannel r
      • selector

        private final java.nio.channels.Selector selector
      • wdummy

        private final java.nio.ByteBuffer wdummy
      • rdummy

        private final java.nio.ByteBuffer rdummy
      • wcursor

        private final java.util.concurrent.atomic.AtomicLong wcursor
      • rcursor

        private long rcursor
      • errno

        private final Errno errno
      • pid

        private final int pid
      • ctx

        private final Ctx ctx
    • Constructor Detail

      • Signaler

        Signaler​(Ctx ctx,
                 int pid,
                 Errno errno)
    • Method Detail

      • maksInterrupt

        private <O> O maksInterrupt​(Signaler.IoOperation<O> operation)
                             throws java.io.IOException
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException
      • getFd

        java.nio.channels.SelectableChannel getFd()
      • send

        void send()
      • waitEvent

        boolean waitEvent​(long timeout)
      • recv

        void recv()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object