use of org.neo4j.causalclustering.core.consensus.RaftMessages.ClusterIdAwareMessage in project neo4j by neo4j.
the class RaftOutbound method send.
@Override
public void send(MemberId to, RaftMessage message) {
Optional<ClusterId> clusterId = clusterIdentity.get();
if (!clusterId.isPresent()) {
log.warn("Attempting to send a message before bound to a cluster");
return;
}
Optional<CoreServerInfo> coreServerInfo = coreTopologyService.coreServers().find(to);
if (coreServerInfo.isPresent()) {
outbound.send(coreServerInfo.get().getRaftServer(), new ClusterIdAwareMessage(clusterId.get(), message));
} else {
unknownAddressMonitor.logAttemptToSendToMemberWithNoKnownAddress(to);
}
}
Aggregations