Package io.atomix.raft.protocol
Class AppendResponse
java.lang.Object
io.atomix.raft.protocol.AbstractRaftResponse
io.atomix.raft.protocol.AppendResponse
- All Implemented Interfaces:
RaftMessage,RaftResponse
Server append entries response.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface io.atomix.raft.protocol.RaftResponse
RaftResponse.Status -
Field Summary
Fields inherited from class io.atomix.raft.protocol.AbstractRaftResponse
error, status -
Constructor Summary
ConstructorsConstructorDescriptionAppendResponse(RaftResponse.Status status, RaftError error, long term, boolean succeeded, long lastLogIndex, long lastSnapshotIndex) -
Method Summary
Modifier and TypeMethodDescriptionstatic AppendResponse.Builderbuilder()Returns a new append response builder.booleaninthashCode()longReturns the last index of the replica's log.longReturns the index of the replica's last snapshotbooleanReturns a boolean indicating whether the append was successful.longterm()Returns the requesting node's current term.toString()Methods inherited from class io.atomix.raft.protocol.AbstractRaftResponse
error, status
-
Constructor Details
-
AppendResponse
public AppendResponse(RaftResponse.Status status, RaftError error, long term, boolean succeeded, long lastLogIndex, long lastSnapshotIndex)
-
-
Method Details
-
builder
Returns a new append response builder.- Returns:
- A new append response builder.
-
term
public long term()Returns the requesting node's current term.- Returns:
- The requesting node's current term.
-
succeeded
public boolean succeeded()Returns a boolean indicating whether the append was successful.- Returns:
- Indicates whether the append was successful.
-
lastLogIndex
public long lastLogIndex()Returns the last index of the replica's log.- Returns:
- The last index of the responding replica's log.
-
lastSnapshotIndex
public long lastSnapshotIndex()Returns the index of the replica's last snapshot- Returns:
- The index of the responding replica's last snapshot
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractRaftResponse
-
equals
- Overrides:
equalsin classAbstractRaftResponse
-
toString
- Overrides:
toStringin classAbstractRaftResponse
-