public Builder withElectionTimeout(Duration electionTimeout){
  Assert.argNot(electionTimeout.isNegative() || electionTimeout.isZero(),"electionTimeout must be positive");
  Assert.argNot(electionTimeout.toMillis() <= heartbeatInterval.toMillis(),"electionTimeout must be greater than heartbeatInterval");
  this.electionTimeout=Assert.notNull(electionTimeout,"electionTimeout");
  return this;
}

public Builder withElectionTimeout ( Duration electionTimeout ) { Assert . argNot ( electionTimeout . isNegative ( ) || electionTimeout . isZero ( ) , "electionTimeout must be positive" ) ; Assert . argNot ( electionTimeout . toMillis ( ) <= heartbeatInterval . toMillis ( ) , "electionTimeout must be greater than heartbeatInterval" ) ; this . electionTimeout = Assert . notNull ( electionTimeout , "electionTimeout" ) ; return this ; }
sets the raft election timeout , returning the raft configuration for method chaining .
