Package zmq

Class Ctx


public class Ctx extends Object
  • Field Details

    • WAIT_FOREVER

      private static final int WAIT_FOREVER
      See Also:
    • active

      private boolean active
    • sockets

      private final List<SocketBase> sockets
    • emptySlots

      private final Deque<Integer> emptySlots
    • starting

      private final AtomicBoolean starting
    • terminating

      private boolean terminating
    • slotSync

      private final Lock slotSync
    • selectors

      private final List<Selector> selectors
    • reaper

      private Reaper reaper
    • ioThreads

      private final List<IOThread> ioThreads
    • slotCount

      private int slotCount
    • slots

      private Mailbox[] slots
    • termMailbox

      private final Mailbox termMailbox
    • endpoints

      private final Map<String,Ctx.Endpoint> endpoints
    • endpointsSync

      private final Lock endpointsSync
    • maxSocketId

      private static AtomicInteger maxSocketId
    • maxSockets

      private int maxSockets
    • ioThreadCount

      private int ioThreadCount
    • blocky

      private boolean blocky
    • optSync

      private final Lock optSync
    • selectorSync

      private final Lock selectorSync
    • TERM_TID

      static final int TERM_TID
      See Also:
    • REAPER_TID

      private static final int REAPER_TID
      See Also:
    • pendingConnections

      private final MultiMap<String,Ctx.PendingConnection> pendingConnections
    • ipv6

      private boolean ipv6
    • errno

      private final Errno errno
  • Constructor Details

    • Ctx

      public Ctx()
  • Method Details

    • destroy

      private void destroy() throws IOException
      Throws:
      IOException
    • isActive

      public boolean isActive()
      Returns:
      false if terminate()terminate() has been called.
    • checkTag

      @Deprecated public boolean checkTag()
      Deprecated.
      use isActive() instead
      Returns:
      false if terminate()terminate() has been called.
    • terminate

      public void terminate()
    • shutdown

      final void shutdown()
    • set

      public boolean set(int option, int optval)
    • get

      public int get(int option)
    • createSocket

      public SocketBase createSocket(int type)
    • initSlots

      private void initSlots()
    • destroySocket

      void destroySocket(SocketBase socket)
    • createSelector

      public Selector createSelector()
    • closeSelector

      public boolean closeSelector(Selector selector)
    • getReaper

      ZObject getReaper()
    • sendCommand

      void sendCommand(int tid, Command command)
    • chooseIoThread

      IOThread chooseIoThread(long affinity)
    • registerEndpoint

      boolean registerEndpoint(String addr, Ctx.Endpoint endpoint)
    • unregisterEndpoint

      boolean unregisterEndpoint(String addr, SocketBase socket)
    • unregisterEndpoints

      void unregisterEndpoints(SocketBase socket)
    • findEndpoint

      Ctx.Endpoint findEndpoint(String addr)
    • pendConnection

      void pendConnection(String addr, Ctx.Endpoint endpoint, Pipe[] pipes)
    • connectPending

      void connectPending(String addr, SocketBase bindSocket)
    • connectInprocSockets

      private void connectInprocSockets(SocketBase bindSocket, Options bindOptions, Ctx.PendingConnection pendingConnection, Ctx.Side side)
    • errno

      public Errno errno()