public class EchoPair extends Object implements ControlledFragmentHandler, AutoCloseable
ControlledFragmentHandler.Action| Modifier and Type | Field and Description |
|---|---|
static int |
FRAGMENT_LIMIT |
| Constructor and Description |
|---|
EchoPair(long correlationId,
Subscription subscription,
Publication publication)
Construct the echo pair.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the echo pair
|
long |
correlationId()
Get the correlationId
|
EchoMonitorMBean |
monitor()
Get the monitoring MBean for this echo pair.
|
ControlledFragmentHandler.Action |
onFragment(DirectBuffer buffer,
int offset,
int length,
Header header)
Callback for handling fragments of data being read from a log.
|
int |
poll()
Poll subscription of the echo pair.
|
public static final int FRAGMENT_LIMIT
public EchoPair(long correlationId,
Subscription subscription,
Publication publication)
correlationId - user supplied correlation idsubscription - to read fragments frompublication - to send fragments back topublic ControlledFragmentHandler.Action onFragment(DirectBuffer buffer, int offset, int length, Header header)
Within this callback reentrant calls to the Aeron client are not permitted and
will result in undefined behaviour.
onFragment in interface ControlledFragmentHandlerbuffer - containing the data.offset - at which the data begins.length - of the data in bytes.header - representing the metadata for the data.public int poll()
public long correlationId()
public EchoMonitorMBean monitor()
public void close()
close in interface AutoCloseableCopyright © 2014-2023 Real Logic Limited. All Rights Reserved.