@FunctionalInterface public interface ControlledEgressListener
ControlledFragmentHandler. Only session messages may be controlled in
consumption, other are consumed via ControlledFragmentHandler.Action.COMMIT.| Modifier and Type | Method and Description |
|---|---|
default void |
onAdminResponse(long clusterSessionId,
long correlationId,
AdminRequestType requestType,
AdminResponseCode responseCode,
String message,
DirectBuffer payload,
int payloadOffset,
int payloadLength)
Message returned in response to an admin request.
|
ControlledFragmentHandler.Action |
onMessage(long clusterSessionId,
long timestamp,
DirectBuffer buffer,
int offset,
int length,
Header header)
Message event returned from the clustered service.
|
default void |
onNewLeader(long clusterSessionId,
long leadershipTermId,
int leaderMemberId,
String ingressEndpoints)
Event indicating a new leader has been elected.
|
default void |
onSessionEvent(long correlationId,
long clusterSessionId,
long leadershipTermId,
int leaderMemberId,
EventCode code,
String detail)
Session event emitted from the cluster which after connect can indicate an error or session close.
|
ControlledFragmentHandler.Action onMessage(long clusterSessionId, long timestamp, DirectBuffer buffer, int offset, int length, Header header)
clusterSessionId - to which the message belongs.timestamp - at which the correlated ingress was sequenced in the cluster.buffer - containing the message.offset - at which the message begins.length - of the message in bytes.header - Aeron header associated with the message fragment.default void onSessionEvent(long correlationId,
long clusterSessionId,
long leadershipTermId,
int leaderMemberId,
EventCode code,
String detail)
correlationId - associated with the cluster ingress.clusterSessionId - to which the event belongs.leadershipTermId - for identifying the active term of leadershipleaderMemberId - identity of the active leader.code - to indicate the type of event.detail - Textual detail to explain the event.default void onNewLeader(long clusterSessionId,
long leadershipTermId,
int leaderMemberId,
String ingressEndpoints)
clusterSessionId - to which the event belongs.leadershipTermId - for identifying the active term of leadershipleaderMemberId - identity of the active leader.ingressEndpoints - for connecting to the cluster which can be updated due to dynamic membership.default void onAdminResponse(long clusterSessionId,
long correlationId,
AdminRequestType requestType,
AdminResponseCode responseCode,
String message,
DirectBuffer payload,
int payloadOffset,
int payloadLength)
clusterSessionId - to which the response belongs.correlationId - of the admin request.requestType - of the admin request.responseCode - describing the response.message - describing the response (e.g. error message).payload - delivered with the response, can be empty.payloadOffset - into the payload buffer.payloadLength - of the payload.Copyright © 2014-2023 Real Logic Limited. All Rights Reserved.