public abstract class LeaderElectorBuilder extends DistributedPrimitiveBuilder<LeaderElectorBuilder,AsyncLeaderElector>
AsyncLeaderElector
instances.Constructor and Description |
---|
LeaderElectorBuilder() |
Modifier and Type | Method and Description |
---|---|
long |
electionTimeoutMillis()
Returns the election timeout in milliseconds.
|
LeaderElectorBuilder |
withElectionTimeout(long electionTimeoutMillis)
Sets the election timeout in milliseconds.
|
LeaderElectorBuilder |
withElectionTimeout(long electionTimeout,
java.util.concurrent.TimeUnit timeUnit)
Sets the election timeout.
|
applicationId, build, meteringEnabled, name, partitionsDisabled, readOnly, relaxedReadConsistency, serializer, type, withApplicationId, withMeteringDisabled, withName, withRelaxedReadConsistency, withSerializer, withUpdatesDisabled
public LeaderElectorBuilder withElectionTimeout(long electionTimeoutMillis)
electionTimeoutMillis
- the election timeout in millisecondspublic LeaderElectorBuilder withElectionTimeout(long electionTimeout, java.util.concurrent.TimeUnit timeUnit)
electionTimeout
- the election timeouttimeUnit
- the timeout time unitpublic final long electionTimeoutMillis()