Ejemplo n.º 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);
 }
Ejemplo n.º 2
0
 @Override
 public void onConnectionStateChanged(ZooKeeperConnectionState state) {
   if (state == ZooKeeperConnectionState.INITIALIZED) {
     masterElection.enroll(this);
   }
 }