use of com.hazelcast.cp.internal.raftop.metadata.PublishActiveCPMembersOp in project hazelcast by hazelcast.
the class MetadataRaftGroupManager method broadcastActiveCPMembers.
void broadcastActiveCPMembers() {
if (!(isDiscoveryCompleted() && isMetadataGroupLeader())) {
return;
}
RaftGroupId metadataGroupId = getMetadataGroupId();
long commitIndex = this.activeMembersCommitIndex;
Collection<CPMemberInfo> cpMembers = this.activeMembers;
if (cpMembers.isEmpty()) {
return;
}
Set<Member> clusterMembers = nodeEngine.getClusterService().getMembers();
OperationService operationService = nodeEngine.getOperationService();
Operation op = new PublishActiveCPMembersOp(metadataGroupId, commitIndex, cpMembers);
for (Member member : clusterMembers) {
if (member.localMember()) {
continue;
}
operationService.send(op, member.getAddress());
}
}
Aggregations