use of com.alipay.sofa.jraft.ReplicatorGroup in project sofa-jraft by sofastack.
the class GrpcClient method notifyReady.
private void notifyReady(final Endpoint endpoint) {
LOG.info("The channel {} has successfully established.", endpoint);
clearConnFailuresCount(endpoint);
final ReplicatorGroup rpGroup = this.replicatorGroup;
if (rpGroup != null) {
try {
RpcUtils.runInThread(() -> {
final PeerId peer = new PeerId();
if (peer.parse(endpoint.toString())) {
LOG.info("Peer {} is connected.", peer);
rpGroup.checkReplicator(peer, true);
} else {
LOG.error("Fail to parse peer: {}.", endpoint);
}
});
} catch (final Throwable t) {
LOG.error("Fail to check replicator {}.", endpoint, t);
}
}
}
Aggregations