Exemple #1
0
 public void rejoin() {
   systemLogService.logJoin("Rejoining!");
   masterAddress = null;
   joined.set(false);
   clusterService.reset();
   failedConnections.clear();
   join();
 }
Exemple #2
0
 Joiner createJoiner() {
   JoinConfig join = config.getNetworkConfig().getJoin();
   if (join.getMulticastConfig().isEnabled() && multicastService != null) {
     logger.info("Creating MulticastJoiner");
     systemLogService.logJoin("Creating MulticastJoiner");
     return new MulticastJoiner(this);
   } else if (join.getTcpIpConfig().isEnabled()) {
     logger.info("Creating TcpIpJoiner");
     systemLogService.logJoin("Creating TcpIpJoiner");
     return new TcpIpJoiner(this);
   } else if (join.getAwsConfig().isEnabled()) {
     Class clazz;
     try {
       logger.info("Creating AWSJoiner");
       clazz = Class.forName("com.hazelcast.cluster.TcpIpJoinerOverAWS");
       Constructor constructor = clazz.getConstructor(Node.class);
       systemLogService.logJoin("Creating AWSJoiner");
       return (Joiner) constructor.newInstance(this);
     } catch (Exception e) {
       logger.severe("Error while creating AWSJoiner!", e);
     }
   }
   return null;
 }
Exemple #3
0
 public void setAsMaster() {
   logger.finest("This node is being set as the master");
   systemLogService.logJoin("No master node found! Setting this node as the master.");
   masterAddress = address;
   setJoined();
 }
Exemple #4
0
 public void setJoined() {
   joined.set(true);
   systemLogService.logJoin("setJoined() master: " + masterAddress);
 }