本文整理了Java中com.hazelcast.instance.Node.createSplitBrainJoinMessage()
方法的一些代码示例,展示了Node.createSplitBrainJoinMessage()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.createSplitBrainJoinMessage()
方法的具体详情如下:
包路径:com.hazelcast.instance.Node
类名称:Node
方法名:createSplitBrainJoinMessage
暂无
代码示例来源:origin: hazelcast/hazelcast-jet
@Override
public void searchForOtherClusters() {
node.multicastService.send(node.createSplitBrainJoinMessage());
SplitBrainJoinMessage splitBrainMsg;
try {
SplitBrainJoinMessage request = node.createSplitBrainJoinMessage();
SplitBrainMergeCheckResult result = sendSplitBrainJoinMessageAndCheckResponse(targetAddress, request);
if (result == SplitBrainMergeCheckResult.LOCAL_NODE_SHOULD_MERGE) {
node.multicastService.send(node.createSplitBrainJoinMessage());
代码示例来源:origin: hazelcast/hazelcast-jet
@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;
}
SplitBrainJoinMessage request = node.createSplitBrainJoinMessage();
for (Address address : possibleAddresses) {
SplitBrainMergeCheckResult result = sendSplitBrainJoinMessageAndCheckResponse(address, request);
if (result == SplitBrainMergeCheckResult.LOCAL_NODE_SHOULD_MERGE) {
logger.warning(node.getThisAddress() + " is merging [tcp/ip] to " + address);
setTargetAddress(address);
startClusterMerge(address, request.getMemberListVersion());
return;
}
}
}
代码示例来源:origin: com.hazelcast/hazelcast-all
@Override
public void searchForOtherClusters() {
node.multicastService.send(node.createSplitBrainJoinMessage());
SplitBrainJoinMessage splitBrainMsg;
try {
SplitBrainJoinMessage request = node.createSplitBrainJoinMessage();
SplitBrainMergeCheckResult result = sendSplitBrainJoinMessageAndCheckResponse(targetAddress, request);
if (result == SplitBrainMergeCheckResult.LOCAL_NODE_SHOULD_MERGE) {
node.multicastService.send(node.createSplitBrainJoinMessage());
代码示例来源:origin: com.hazelcast/hazelcast-all
@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;
}
SplitBrainJoinMessage request = node.createSplitBrainJoinMessage();
for (Address address : possibleAddresses) {
SplitBrainMergeCheckResult result = sendSplitBrainJoinMessageAndCheckResponse(address, request);
if (result == SplitBrainMergeCheckResult.LOCAL_NODE_SHOULD_MERGE) {
logger.warning(node.getThisAddress() + " is merging [tcp/ip] to " + address);
setTargetAddress(address);
startClusterMerge(address, request.getMemberListVersion());
return;
}
}
}
代码示例来源:origin: hazelcast/hazelcast-jet
@Override
public void run() {
NodeEngineImpl nodeEngine = (NodeEngineImpl) getNodeEngine();
Node node = nodeEngine.getNode();
if (!preCheck(node)) {
return;
}
if (!masterCheck()) {
return;
}
if (request != null) {
ILogger logger = getLogger();
if (checkSplitBrainJoinMessage()) {
response = node.createSplitBrainJoinMessage();
}
if (logger.isFineEnabled()) {
logger.fine("Returning " + response + " to " + getCallerAddress());
}
}
}
代码示例来源:origin: com.hazelcast/hazelcast-all
@Override
public void run() {
NodeEngineImpl nodeEngine = (NodeEngineImpl) getNodeEngine();
Node node = nodeEngine.getNode();
if (!preCheck(node)) {
return;
}
if (!masterCheck()) {
return;
}
if (request != null) {
ILogger logger = getLogger();
if (checkSplitBrainJoinMessage()) {
response = node.createSplitBrainJoinMessage();
}
if (logger.isFineEnabled()) {
logger.fine("Returning " + response + " to " + getCallerAddress());
}
}
}
内容来源于网络,如有侵权,请联系作者删除!