private void becomeFollower(){ // stop heartbeat for all peers for(PeerServer server : this.peers.values()){ if(server.getHeartbeatTask() != null){ server.getHeartbeatTask().cancel(false); } server.enableHeartbeat(false); } this.serverToJoin = null; this.role = ServerRole.Follower; this.restartElectionTimer(); }
private void becomeFollower(){ // stop heartbeat for all peers for(PeerServer server : this.peers.values()){ if(server.getHeartbeatTask() != null){ server.getHeartbeatTask().cancel(false); } server.enableHeartbeat(false); } this.serverToJoin = null; this.role = ServerRole.Follower; this.restartElectionTimer(); }
private void becomeFollower(){ // stop heartbeat for all peers for(PeerServer server : this.peers.values()){ if(server.getHeartbeatTask() != null){ server.getHeartbeatTask().cancel(false); } server.enableHeartbeat(false); } this.serverToJoin = null; this.role = ServerRole.Follower; this.restartElectionTimer(); }
this.restartElectionTimer(); return; this.restartElectionTimer(); return; this.restartElectionTimer();
this.restartElectionTimer(); return; this.restartElectionTimer(); return; this.restartElectionTimer();
this.restartElectionTimer(); return; this.restartElectionTimer(); return; this.restartElectionTimer();
this.role = ServerRole.Follower; new Thread(this.commitingThread).start(); this.restartElectionTimer(); this.logger.info("Server %d started", this.id);
this.role = ServerRole.Follower; new Thread(this.commitingThread).start(); this.restartElectionTimer(); this.logger.info("Server %d started", this.id);
this.role = ServerRole.Follower; new Thread(this.commitingThread).start(); this.restartElectionTimer(); this.logger.info("Server %d started", this.id);
this.logger.info("snapshot is successfully applied"); }finally{ this.restartElectionTimer();
this.logger.info("snapshot is successfully applied"); }finally{ this.restartElectionTimer();
this.logger.info("snapshot is successfully applied"); }finally{ this.restartElectionTimer();
System.exit(-1); }else{ this.restartElectionTimer();
this.stateMachine.exit(-1); }else{ this.restartElectionTimer();
this.stateMachine.exit(-1); }else{ this.restartElectionTimer();
System.exit(-1); }else{ this.restartElectionTimer();
this.stateMachine.exit(-1); }else{ this.restartElectionTimer();
this.stateMachine.exit(-1); }else{ this.restartElectionTimer();