コード例 #1
0
  public void start() {
    clusterThread.start();

    // TODO: replace with a better wait-notify
    while (membersRef.get() == null && clusterThread.isAlive()) {
      try {
        Thread.sleep(100);
      } catch (InterruptedException e) {
        throw new HazelcastException(e);
      }
    }
    initMembershipListener();
    active = true;
    // started
  }
コード例 #2
0
 public void stop() {
   active = false;
   clusterThread.shutdown();
 }