Package io.aeron.driver.media
Class DataTransportPoller
java.lang.Object
org.agrona.nio.TransportPoller
io.aeron.driver.media.UdpTransportPoller
io.aeron.driver.media.DataTransportPoller
- All Implemented Interfaces:
AutoCloseable
Encapsulates the polling of data
UdpChannelTransports using whatever means provides the lowest latency.-
Field Summary
Fields inherited from class io.aeron.driver.media.UdpTransportPoller
errorHandlerFields inherited from class org.agrona.nio.TransportPoller
ITERATION_THRESHOLD, ITERATION_THRESHOLD_DEFAULT, ITERATION_THRESHOLD_PROP_NAME, selector -
Constructor Summary
ConstructorsConstructorDescriptionDataTransportPoller(ErrorHandler errorHandler) Construct a newTransportPollerwith anErrorHandlerfor logging. -
Method Summary
Modifier and TypeMethodDescriptionvoidcancelRead(ReceiveChannelEndpoint channelEndpoint, UdpChannelTransport transport) Cancel the reading of a given transport.voidcancelReadForAllTransports(ReceiveChannelEndpoint channelEndpoint) Cancel all reads of a given channel.voidcheckForReResolutions(long nowNs, DriverConductorProxy conductorProxy) Check if any of the registered channels or transports require re-resolution.voidclose()intExplicit event loop processing as a poll.voidregisterForRead(ReceiveChannelEndpoint channelEndpoint, UdpChannelTransport transport, int transportIndex) Register transport for reading with the poller.toString()Methods inherited from class org.agrona.nio.TransportPoller
selectNowWithoutProcessing
-
Constructor Details
-
DataTransportPoller
Construct a newTransportPollerwith anErrorHandlerfor logging.- Parameters:
errorHandler- which can be used to log errors and continue.
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Overrides:
closein classTransportPoller
-
pollTransports
public int pollTransports()Explicit event loop processing as a poll.- Specified by:
pollTransportsin classUdpTransportPoller- 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
Cancel the reading of a given transport.- Parameters:
channelEndpoint- to which the transport belongs.transport- transport which was previously registered.
-
cancelReadForAllTransports
Cancel all reads of a given channel.- Parameters:
channelEndpoint- to which the transport belongs.
-
checkForReResolutions
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
-