Package io.aeron.driver.ext
Class DebugSendChannelEndpoint
java.lang.Object
io.aeron.driver.media.UdpChannelTransport
io.aeron.driver.media.SendChannelEndpoint
io.aeron.driver.ext.DebugSendChannelEndpoint
- All Implemented Interfaces:
AutoCloseable
Debug implementation which can introduce loss.
-
Field Summary
Fields inherited from class io.aeron.driver.media.UdpChannelTransport
connectAddress, context, errorHandler, receiveDatagramChannel, sendDatagramChannel, udpChannel -
Constructor Summary
ConstructorsConstructorDescriptionDebugSendChannelEndpoint(UdpChannel udpChannel, AtomicCounter statusIndicator, MediaDriver.Context context) Construct aSendChannelEndpointwith defaults for loss fromDebugChannelEndpointConfiguration.DebugSendChannelEndpoint(UdpChannel udpChannel, AtomicCounter statusIndicator, MediaDriver.Context context, LossGenerator dataLossGenerator, LossGenerator controlLossGenerator) Construct aSendChannelEndpointwith configuration for loss rate and seed. -
Method Summary
Modifier and TypeMethodDescriptionvoidonNakMessage(NakFlyweight msg, UnsafeBuffer buffer, int length, InetSocketAddress srcAddress) Callback back handler for received NAK messages.voidonRttMeasurement(RttMeasurementFlyweight msg, UnsafeBuffer buffer, int length, InetSocketAddress srcAddress) Callback back handler for received RTT Measurement messages.voidonStatusMessage(StatusMessageFlyweight msg, UnsafeBuffer buffer, int length, InetSocketAddress srcAddress, DriverConductorProxy conductorProxy) Callback back handler for received status messages.intsend(ByteBuffer buffer) Send contents of aByteBufferto connected address.Methods inherited from class io.aeron.driver.media.SendChannelEndpoint
addDestination, allocateDestinationsCounterForMdc, checkForReResolution, close, decRef, incRef, indicateActive, localSocketAddressIndicator, matchesTag, onError, onResponseSetup, openChannel, originalUriString, registerForSend, removeDestination, removeDestination, resolutionChange, send, shouldBeClosed, statusIndicatorCounterId, unregisterForSend, validateAllowsManualControlMethods inherited from class io.aeron.driver.media.UdpChannelTransport
bindAddressAndPort, isMulticast, isValidFrame, multicastTtl, onSendError, openDatagramChannel, receive, receiveDatagramChannel, receiveHook, resendHook, sendError, sendHook, socketRcvbufLength, socketSndbufLength, udpChannel, updateEndpoint
-
Constructor Details
-
DebugSendChannelEndpoint
public DebugSendChannelEndpoint(UdpChannel udpChannel, AtomicCounter statusIndicator, MediaDriver.Context context) Construct aSendChannelEndpointwith defaults for loss fromDebugChannelEndpointConfiguration.- Parameters:
udpChannel- for the media.statusIndicator- for the endpoint for the channel.context- for configuration.
-
DebugSendChannelEndpoint
public DebugSendChannelEndpoint(UdpChannel udpChannel, AtomicCounter statusIndicator, MediaDriver.Context context, LossGenerator dataLossGenerator, LossGenerator controlLossGenerator) Construct aSendChannelEndpointwith configuration for loss rate and seed.- Parameters:
udpChannel- for the media.statusIndicator- for the endpoint for the channel.context- for configuration.dataLossGenerator- for the random loss on the data stream.controlLossGenerator- for the random loss on the control stream.
-
-
Method Details
-
send
Send contents of aByteBufferto connected address. This is used on the sender side for performance over send(ByteBuffer, SocketAddress).- Overrides:
sendin classSendChannelEndpoint- Parameters:
buffer- to send- Returns:
- number of bytes sent
-
onStatusMessage
public void onStatusMessage(StatusMessageFlyweight msg, UnsafeBuffer buffer, int length, InetSocketAddress srcAddress, DriverConductorProxy conductorProxy) Callback back handler for received status messages.- Overrides:
onStatusMessagein classSendChannelEndpoint- Parameters:
msg- flyweight over the status message.buffer- containing the message.length- of the message.srcAddress- of the message.conductorProxy- to send messages back to the conductor.
-
onNakMessage
public void onNakMessage(NakFlyweight msg, UnsafeBuffer buffer, int length, InetSocketAddress srcAddress) Callback back handler for received NAK messages.- Overrides:
onNakMessagein classSendChannelEndpoint- Parameters:
msg- flyweight over the NAK message.buffer- containing the message.length- of the message.srcAddress- of the message.
-
onRttMeasurement
public void onRttMeasurement(RttMeasurementFlyweight msg, UnsafeBuffer buffer, int length, InetSocketAddress srcAddress) Callback back handler for received RTT Measurement messages.- Overrides:
onRttMeasurementin classSendChannelEndpoint- Parameters:
msg- flyweight over the RTT message.buffer- containing the message.length- of the message.srcAddress- of the message.
-