public final class EgressAdapter extends Object implements FragmentHandler
EgressListener.| Constructor and Description |
|---|
EgressAdapter(EgressListener listener,
long clusterSessionId,
Subscription subscription,
int fragmentLimit)
Construct an adapter for cluster egress which consumes from the subscription and dispatches to the
EgressListener. |
| Modifier and Type | Method and Description |
|---|---|
void |
onFragment(DirectBuffer buffer,
int offset,
int length,
Header header)
Callback for handling fragments of data being read from a log.
|
int |
poll()
Poll the egress subscription and dispatch assembled events to the
EgressListener. |
public EgressAdapter(EgressListener listener, long clusterSessionId, Subscription subscription, int fragmentLimit)
EgressListener.listener - to dispatch events to.clusterSessionId - for the egress.subscription - over the egress stream.fragmentLimit - to poll on each poll() operation.public int poll()
EgressListener.public void 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 FragmentHandlerbuffer - containing the data.offset - at which the data begins.length - of the data in bytes.header - representing the metadata for the data.Copyright © 2014-2023 Real Logic Limited. All Rights Reserved.