Class TransportPoller

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public class TransportPoller
    extends java.lang.Object
    implements java.lang.AutoCloseable
    Implements the common functionality for a transport poller.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int ITERATION_THRESHOLD
      Threshold beyond which individual channel/socket polling will swap to using a Selector.
      static int ITERATION_THRESHOLD_DEFAULT
      Default threshold beyond which individual channel/socket polling will swap to using a Selector.
      static java.lang.String ITERATION_THRESHOLD_PROP_NAME
      System property name for the threshold beyond which individual channel/socket polling will swap to using a Selector.
      protected java.nio.channels.Selector selector
      Reference to the Selector for the transport.
    • Constructor Summary

      Constructors 
      Constructor Description
      TransportPoller()
      Default constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Close NioSelector down.
      void selectNowWithoutProcessing()
      Explicit call to Selector.selectNow() followed by clearing out the set without processing.
      • Methods inherited from class java.lang.Object

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

      • ITERATION_THRESHOLD_PROP_NAME

        public static final java.lang.String ITERATION_THRESHOLD_PROP_NAME
        System property name for the threshold beyond which individual channel/socket polling will swap to using a Selector.
        See Also:
        Constant Field Values
      • ITERATION_THRESHOLD_DEFAULT

        public static final int ITERATION_THRESHOLD_DEFAULT
        Default threshold beyond which individual channel/socket polling will swap to using a Selector.
        See Also:
        Constant Field Values
      • selector

        protected final java.nio.channels.Selector selector
        Reference to the Selector for the transport.
    • Constructor Detail

      • TransportPoller

        public TransportPoller()
        Default constructor.
    • Method Detail

      • close

        public void close()
        Close NioSelector down. Returns immediately.
        Specified by:
        close in interface java.lang.AutoCloseable
      • selectNowWithoutProcessing

        public void selectNowWithoutProcessing()
        Explicit call to Selector.selectNow() followed by clearing out the set without processing.