コード例 #1
0
 @Override
 public void onElectionWithdrawn(ZooKeeperElection election) {
   logger.warn("Unexpected withdrawal from master election, going on standby and re-enrolling");
   changeFailoverState(FailoverState.STANDBY);
   masterElection.enroll(this);
 }
コード例 #2
0
 @Override
 public void onConnectionStateChanged(ZooKeeperConnectionState state) {
   if (state == ZooKeeperConnectionState.INITIALIZED) {
     masterElection.enroll(this);
   }
 }