- public RaftActorBehavior handleMessage(ActorRef sender, Object originalMessage) {
- if (originalMessage instanceof ElectionTimeout) {
- LOG.debug("{}: Received ElectionTimeout", logName());
+ protected FiniteDuration electionDuration() {
+ return super.electionDuration().$div(context.getConfigParams().getCandidateElectionTimeoutDivisor());
+ }
+
+
+ @Override
+ ApplyState getApplyStateFor(final ReplicatedLogEntry entry) {
+ throw new IllegalStateException("A candidate should never attempt to apply " + entry);
+ }
+
+ @Override
+ public RaftActorBehavior handleMessage(final ActorRef sender, final Object message) {
+ if (message instanceof ElectionTimeout) {
+ log.debug("{}: Received ElectionTimeout", logName());