Package io.atomix.raft.protocol
Class ForceConfigureRequest.Builder
java.lang.Object
io.atomix.raft.protocol.AbstractRaftRequest.Builder<ForceConfigureRequest.Builder,ForceConfigureRequest>
io.atomix.raft.protocol.ForceConfigureRequest.Builder
- All Implemented Interfaces:
RaftRequest.Builder<ForceConfigureRequest.Builder,,ForceConfigureRequest> Builder<ForceConfigureRequest>
- Enclosing class:
ForceConfigureRequest
public static class ForceConfigureRequest.Builder
extends AbstractRaftRequest.Builder<ForceConfigureRequest.Builder,ForceConfigureRequest>
Heartbeat request builder.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()protected voidvalidate()Validates the builder.withIndex(long index) Sets the request index.withNewMembers(Set<RaftMember> newMembers) Sets the members that will be part of the new configurationwithTerm(long term) Sets the request term.withTime(long timestamp) Sets the request timestamp.Methods inherited from class io.atomix.raft.protocol.AbstractRaftRequest.Builder
toString
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
withTerm
Sets the request term.- Parameters:
term- The request term.- Returns:
- The append request builder.
- Throws:
IllegalArgumentException- if thetermis not positive
-
withIndex
Sets the request index.- Parameters:
index- The request index.- Returns:
- The request builder.
-
withTime
Sets the request timestamp.- Parameters:
timestamp- The request timestamp.- Returns:
- The request builder.
-
withNewMembers
Sets the members that will be part of the new configuration- Parameters:
newMembers- members in the new configuration.- Returns:
- The request builder.
- Throws:
NullPointerException- ifmemberis null
-
from
-
build
- Throws:
IllegalStateException- if member is null
-
validate
protected void validate()Description copied from class:AbstractRaftRequest.BuilderValidates the builder.- Overrides:
validatein classAbstractRaftRequest.Builder<ForceConfigureRequest.Builder,ForceConfigureRequest>
-