use of com.hazelcast.internal.cluster.impl.SplitBrainJoinMessage in project hazelcast by hazelcast.
the class SplitBrainMergeValidationOperation method readInternal.
@Override
protected void readInternal(final ObjectDataInput in) throws IOException {
request = new SplitBrainJoinMessage();
request.readData(in);
}
use of com.hazelcast.internal.cluster.impl.SplitBrainJoinMessage in project hazelcast by hazelcast.
the class TcpIpJoiner method searchForOtherClusters.
@Override
public void searchForOtherClusters() {
final Collection<Address> possibleAddresses;
try {
possibleAddresses = getPossibleAddresses();
} catch (Throwable e) {
logger.severe(e);
return;
}
possibleAddresses.remove(node.getThisAddress());
possibleAddresses.removeAll(node.getClusterService().getMemberAddresses());
if (possibleAddresses.isEmpty()) {
return;
}
for (Address address : possibleAddresses) {
SplitBrainJoinMessage response = sendSplitBrainJoinMessage(address);
if (shouldMerge(response)) {
logger.warning(node.getThisAddress() + " is merging [tcp/ip] to " + address);
setTargetAddress(address);
startClusterMerge(address);
return;
}
}
}
use of com.hazelcast.internal.cluster.impl.SplitBrainJoinMessage in project hazelcast by hazelcast.
the class MockJoiner method searchForOtherClusters.
public void searchForOtherClusters() {
Collection<Address> possibleAddresses = new ArrayList<Address>(registry.getJoinAddresses());
possibleAddresses.remove(node.getThisAddress());
possibleAddresses.removeAll(node.getClusterService().getMemberAddresses());
SplitBrainJoinMessage request = node.createSplitBrainJoinMessage();
for (Address address : possibleAddresses) {
SplitBrainMergeCheckResult result = sendSplitBrainJoinMessageAndCheckResponse(address, request);
if (result == SplitBrainMergeCheckResult.LOCAL_NODE_SHOULD_MERGE) {
startClusterMerge(address, request.getMemberListVersion());
return;
}
}
}
use of com.hazelcast.internal.cluster.impl.SplitBrainJoinMessage in project hazelcast by hazelcast.
the class Node method createSplitBrainJoinMessage.
public SplitBrainJoinMessage createSplitBrainJoinMessage() {
MemberImpl localMember = getLocalMember();
boolean liteMember = localMember.isLiteMember();
Collection<Address> memberAddresses = clusterService.getMemberAddresses();
int dataMemberCount = clusterService.getSize(DATA_MEMBER_SELECTOR);
Version clusterVersion = clusterService.getClusterVersion();
int memberListVersion = clusterService.getMembershipManager().getMemberListVersion();
return new SplitBrainJoinMessage(Packet.VERSION, buildInfo.getBuildNumber(), version, address, localMember.getUuid(), liteMember, createConfigCheck(), memberAddresses, dataMemberCount, clusterVersion, memberListVersion);
}
Aggregations