public class BasicAuctionClusterClient extends Object implements EgressListener
BasicAuctionClusteredService.| Constructor and Description |
|---|
BasicAuctionClusterClient(long customerId,
int numOfBids,
int bidIntervalMs) |
| Modifier and Type | Method and Description |
|---|---|
static String |
ingressEndpoints(List<String> hostnames) |
static void |
main(String[] args)
Main method for launching the process.
|
void |
onMessage(long clusterSessionId,
long timestamp,
DirectBuffer buffer,
int offset,
int length,
Header header)
Message returned from the clustered service.
|
void |
onNewLeader(long clusterSessionId,
long leadershipTermId,
int leaderMemberId,
String ingressEndpoints)
Event indicating a new leader has been elected.
|
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.
|
public BasicAuctionClusterClient(long customerId,
int numOfBids,
int bidIntervalMs)
public void onMessage(long clusterSessionId,
long timestamp,
DirectBuffer buffer,
int offset,
int length,
Header header)
EgressListeneronMessage in interface EgressListenerclusterSessionId - 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.public void onSessionEvent(long correlationId,
long clusterSessionId,
long leadershipTermId,
int leaderMemberId,
EventCode code,
String detail)
EgressListeneronSessionEvent in interface EgressListenercorrelationId - 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.public void onNewLeader(long clusterSessionId,
long leadershipTermId,
int leaderMemberId,
String ingressEndpoints)
EgressListeneronNewLeader in interface EgressListenerclusterSessionId - 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.public static void main(String[] args)
args - passed to the process.Copyright © 2014-2020 Real Logic Limited. All Rights Reserved.