use of com.hazelcast.internal.cluster.impl.operations.MemberRemoveOperation in project hazelcast by hazelcast.
the class ClusterServiceImpl method sendMemberRemoveOperation.
private void sendMemberRemoveOperation(Member deadMember) {
for (Member member : getMembers()) {
Address address = member.getAddress();
if (!thisAddress.equals(address) && !address.equals(deadMember.getAddress())) {
MemberRemoveOperation op = new MemberRemoveOperation(deadMember.getAddress(), deadMember.getUuid());
nodeEngine.getOperationService().send(op, address);
}
}
}
use of com.hazelcast.internal.cluster.impl.operations.MemberRemoveOperation in project hazelcast by hazelcast.
the class AbstractJoiner method checkMembershipIntersectionSetEmpty.
private boolean checkMembershipIntersectionSetEmpty(SplitBrainJoinMessage joinMessage) {
Collection<Address> targetMemberAddresses = joinMessage.getMemberAddresses();
if (targetMemberAddresses.contains(node.getThisAddress())) {
node.nodeEngine.getOperationService().send(new MemberRemoveOperation(node.getThisAddress()), joinMessage.getAddress());
logger.info(node.getThisAddress() + " CANNOT merge to " + joinMessage.getAddress() + ", because it thinks this-node as its member.");
return false;
}
Collection<Address> thisMemberAddresses = clusterService.getMemberAddresses();
for (Address address : thisMemberAddresses) {
if (targetMemberAddresses.contains(address)) {
logger.info(node.getThisAddress() + " CANNOT merge to " + joinMessage.getAddress() + ", because it thinks " + address + " as its member. " + "But " + address + " is member of this cluster.");
return false;
}
}
return true;
}
Aggregations