public final class EgressPoller extends Object implements ControlledFragmentHandler
ControlledFragmentHandler.Action| Constructor and Description |
|---|
EgressPoller(Subscription subscription,
int fragmentLimit)
Construct a poller on the egress subscription.
|
| Modifier and Type | Method and Description |
|---|---|
long |
clusterSessionId()
Cluster session id of the last polled event or
Aeron.NULL_VALUE if poll returned nothing. |
long |
correlationId()
Correlation id of the last polled event or
Aeron.NULL_VALUE if poll returned nothing. |
String |
detail()
Get the detail returned in the last session event.
|
byte[] |
encodedChallenge()
Get the encoded challenge in the last challenge.
|
EventCode |
eventCode()
Get the event code returned from the last session event.
|
boolean |
isChallenged()
Was last message a challenge or not?
|
boolean |
isPollComplete()
Has the last polling action received a complete event?
|
int |
leaderMemberId()
Leader cluster member id of the last polled event or
Aeron.NULL_VALUE if poll returned nothing. |
long |
leadershipTermId()
Leadership term id of the last polled event or
Aeron.NULL_VALUE if poll returned nothing. |
ControlledFragmentHandler.Action |
onFragment(DirectBuffer buffer,
int offset,
int length,
Header header)
Callback for handling fragments of data being read from a log.
|
int |
poll()
Reset last captured value and poll the egress subscription for output.
|
Subscription |
subscription()
Get the
Subscription used for polling events. |
int |
templateId()
Get the template id of the last received event.
|
int |
version()
Version response from the server in semantic version form.
|
public EgressPoller(Subscription subscription, int fragmentLimit)
subscription - for egress from the cluster.fragmentLimit - for each poll operation.public Subscription subscription()
Subscription used for polling events.Subscription used for polling events.public int templateId()
public long clusterSessionId()
Aeron.NULL_VALUE if poll returned nothing.Aeron.NULL_VALUE if not returned.public long correlationId()
Aeron.NULL_VALUE if poll returned nothing.Aeron.NULL_VALUE if not returned.public long leadershipTermId()
Aeron.NULL_VALUE if poll returned nothing.Aeron.NULL_VALUE if not returned.public int leaderMemberId()
Aeron.NULL_VALUE if poll returned nothing.Aeron.NULL_VALUE if poll returned nothing.public EventCode eventCode()
public int version()
public String detail()
public byte[] encodedChallenge()
public boolean isPollComplete()
public boolean isChallenged()
public int poll()
public 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 meta data for the data.Copyright © 2014-2020 Real Logic Limited. All Rights Reserved.