Package io.atomix.raft.protocol
Class AbstractRaftResponse.Builder<T extends AbstractRaftResponse.Builder<T,U>,U extends AbstractRaftResponse>
java.lang.Object
io.atomix.raft.protocol.AbstractRaftResponse.Builder<T,U>
- Type Parameters:
T- The builder type.U- The response type.
- All Implemented Interfaces:
RaftResponse.Builder<T,,U> Builder<U>
- Direct Known Subclasses:
AppendResponse.Builder,ConfigurationResponse.Builder,ConfigureResponse.Builder,InstallResponse.Builder,PollResponse.Builder,TransferResponse.Builder,VoteResponse.Builder
- Enclosing class:
- AbstractRaftResponse
protected abstract static class AbstractRaftResponse.Builder<T extends AbstractRaftResponse.Builder<T,U>,U extends AbstractRaftResponse>
extends Object
implements RaftResponse.Builder<T,U>
Abstract response builder.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiontoString()protected voidvalidate()Validates the builder.Sets the response error.withStatus(RaftResponse.Status status) Sets the response status.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.atomix.raft.protocol.RaftResponse.Builder
withError, withError
-
Field Details
-
status
-
error
-
-
Constructor Details
-
Builder
protected Builder()
-
-
Method Details
-
withStatus
Description copied from interface:RaftResponse.BuilderSets the response status.- Specified by:
withStatusin interfaceRaftResponse.Builder<T extends AbstractRaftResponse.Builder<T,U>, U extends AbstractRaftResponse> - Parameters:
status- The response status.- Returns:
- The response builder.
-
withError
Description copied from interface:RaftResponse.BuilderSets the response error.- Specified by:
withErrorin interfaceRaftResponse.Builder<T extends AbstractRaftResponse.Builder<T,U>, U extends AbstractRaftResponse> - Parameters:
error- The response error.- Returns:
- The response builder.
-
validate
protected void validate()Validates the builder. -
toString
-