com.hazelcast.instance.Node.createSplitBrainJoinMessage()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(3.8k)|赞(0)|评价(0)|浏览(302)

本文整理了Java中com.hazelcast.instance.Node.createSplitBrainJoinMessage()方法的一些代码示例,展示了Node.createSplitBrainJoinMessage()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.createSplitBrainJoinMessage()方法的具体详情如下:
包路径:com.hazelcast.instance.Node
类名称:Node
方法名:createSplitBrainJoinMessage

Node.createSplitBrainJoinMessage介绍

暂无

代码示例

代码示例来源:origin: hazelcast/hazelcast-jet

  1. @Override
  2. public void searchForOtherClusters() {
  3. node.multicastService.send(node.createSplitBrainJoinMessage());
  4. SplitBrainJoinMessage splitBrainMsg;
  5. try {
  6. SplitBrainJoinMessage request = node.createSplitBrainJoinMessage();
  7. SplitBrainMergeCheckResult result = sendSplitBrainJoinMessageAndCheckResponse(targetAddress, request);
  8. if (result == SplitBrainMergeCheckResult.LOCAL_NODE_SHOULD_MERGE) {
  9. node.multicastService.send(node.createSplitBrainJoinMessage());

代码示例来源:origin: hazelcast/hazelcast-jet

  1. @Override
  2. public void searchForOtherClusters() {
  3. final Collection<Address> possibleAddresses;
  4. try {
  5. possibleAddresses = getPossibleAddresses();
  6. } catch (Throwable e) {
  7. logger.severe(e);
  8. return;
  9. }
  10. possibleAddresses.remove(node.getThisAddress());
  11. possibleAddresses.removeAll(node.getClusterService().getMemberAddresses());
  12. if (possibleAddresses.isEmpty()) {
  13. return;
  14. }
  15. SplitBrainJoinMessage request = node.createSplitBrainJoinMessage();
  16. for (Address address : possibleAddresses) {
  17. SplitBrainMergeCheckResult result = sendSplitBrainJoinMessageAndCheckResponse(address, request);
  18. if (result == SplitBrainMergeCheckResult.LOCAL_NODE_SHOULD_MERGE) {
  19. logger.warning(node.getThisAddress() + " is merging [tcp/ip] to " + address);
  20. setTargetAddress(address);
  21. startClusterMerge(address, request.getMemberListVersion());
  22. return;
  23. }
  24. }
  25. }

代码示例来源:origin: com.hazelcast/hazelcast-all

  1. @Override
  2. public void searchForOtherClusters() {
  3. node.multicastService.send(node.createSplitBrainJoinMessage());
  4. SplitBrainJoinMessage splitBrainMsg;
  5. try {
  6. SplitBrainJoinMessage request = node.createSplitBrainJoinMessage();
  7. SplitBrainMergeCheckResult result = sendSplitBrainJoinMessageAndCheckResponse(targetAddress, request);
  8. if (result == SplitBrainMergeCheckResult.LOCAL_NODE_SHOULD_MERGE) {
  9. node.multicastService.send(node.createSplitBrainJoinMessage());

代码示例来源:origin: com.hazelcast/hazelcast-all

  1. @Override
  2. public void searchForOtherClusters() {
  3. final Collection<Address> possibleAddresses;
  4. try {
  5. possibleAddresses = getPossibleAddresses();
  6. } catch (Throwable e) {
  7. logger.severe(e);
  8. return;
  9. }
  10. possibleAddresses.remove(node.getThisAddress());
  11. possibleAddresses.removeAll(node.getClusterService().getMemberAddresses());
  12. if (possibleAddresses.isEmpty()) {
  13. return;
  14. }
  15. SplitBrainJoinMessage request = node.createSplitBrainJoinMessage();
  16. for (Address address : possibleAddresses) {
  17. SplitBrainMergeCheckResult result = sendSplitBrainJoinMessageAndCheckResponse(address, request);
  18. if (result == SplitBrainMergeCheckResult.LOCAL_NODE_SHOULD_MERGE) {
  19. logger.warning(node.getThisAddress() + " is merging [tcp/ip] to " + address);
  20. setTargetAddress(address);
  21. startClusterMerge(address, request.getMemberListVersion());
  22. return;
  23. }
  24. }
  25. }

代码示例来源:origin: hazelcast/hazelcast-jet

  1. @Override
  2. public void run() {
  3. NodeEngineImpl nodeEngine = (NodeEngineImpl) getNodeEngine();
  4. Node node = nodeEngine.getNode();
  5. if (!preCheck(node)) {
  6. return;
  7. }
  8. if (!masterCheck()) {
  9. return;
  10. }
  11. if (request != null) {
  12. ILogger logger = getLogger();
  13. if (checkSplitBrainJoinMessage()) {
  14. response = node.createSplitBrainJoinMessage();
  15. }
  16. if (logger.isFineEnabled()) {
  17. logger.fine("Returning " + response + " to " + getCallerAddress());
  18. }
  19. }
  20. }

代码示例来源:origin: com.hazelcast/hazelcast-all

  1. @Override
  2. public void run() {
  3. NodeEngineImpl nodeEngine = (NodeEngineImpl) getNodeEngine();
  4. Node node = nodeEngine.getNode();
  5. if (!preCheck(node)) {
  6. return;
  7. }
  8. if (!masterCheck()) {
  9. return;
  10. }
  11. if (request != null) {
  12. ILogger logger = getLogger();
  13. if (checkSplitBrainJoinMessage()) {
  14. response = node.createSplitBrainJoinMessage();
  15. }
  16. if (logger.isFineEnabled()) {
  17. logger.fine("Returning " + response + " to " + getCallerAddress());
  18. }
  19. }
  20. }

相关文章