Class DataTransportPoller

All Implemented Interfaces:
AutoCloseable

public final class DataTransportPoller extends UdpTransportPoller
Encapsulates the polling of data UdpChannelTransports using whatever means provides the lowest latency.
  • Constructor Details

    • DataTransportPoller

      public DataTransportPoller(ErrorHandler errorHandler)
      Construct a new TransportPoller with an ErrorHandler for logging.
      Parameters:
      errorHandler - which can be used to log errors and continue.
  • Method Details

    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Overrides:
      close in class TransportPoller
    • pollTransports

      public int pollTransports()
      Explicit event loop processing as a poll.
      Specified by:
      pollTransports in class UdpTransportPoller
      Returns:
      the number of frames processed.
    • registerForRead

      public void registerForRead(ReceiveChannelEndpoint channelEndpoint, UdpChannelTransport transport, int transportIndex)
      Register transport for reading with the poller.
      Parameters:
      channelEndpoint - to which the transport belongs.
      transport - new transport to be registered.
      transportIndex - for the transport in the channel.
    • cancelRead

      public void cancelRead(ReceiveChannelEndpoint channelEndpoint, UdpChannelTransport transport)
      Cancel the reading of a given transport.
      Parameters:
      channelEndpoint - to which the transport belongs.
      transport - transport which was previously registered.
    • cancelReadForAllTransports

      public void cancelReadForAllTransports(ReceiveChannelEndpoint channelEndpoint)
      Cancel all reads of a given channel.
      Parameters:
      channelEndpoint - to which the transport belongs.
    • checkForReResolutions

      public void checkForReResolutions(long nowNs, DriverConductorProxy conductorProxy)
      Check if any of the registered channels or transports require re-resolution.
      Parameters:
      nowNs - as the current time.
      conductorProxy - for sending re-resolution requests.
    • toString

      public String toString()
      Overrides:
      toString in class Object