java.lang.Object
org.jgroups.protocols.raft.AppendResult
- All Implemented Interfaces:
org.jgroups.util.Streamable
The result of an AppendEntries request
- Since:
- 0.1
- Author:
- Bela Ban
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected longThe commit_index of the followerprotected longThe index of the last appended entry if success == true.protected longIgnored if success == true.protected AppendResult.ResultTrue if the append succeeded, false otherwise -
Constructor Summary
ConstructorsConstructorDescriptionAppendResult(AppendResult.Result result, long index) AppendResult(AppendResult.Result result, long index, long non_matching_term) -
Method Summary
Modifier and TypeMethodDescriptionlongcommitIndex(long ci) longindex()longvoidintsize()booleansuccess()toString()voidwriteTo(DataOutput out)
-
Field Details
-
result
True if the append succeeded, false otherwise -
index
protected long indexThe index of the last appended entry if success == true. If success is false, the first index for non-matching term. If index == 0, this means the follower doesn't have a log and needs to run the InstallSnapshot protocol to fetch the initial snapshot -
commit_index
protected long commit_indexThe commit_index of the follower -
non_matching_term
protected long non_matching_termIgnored if success == true. If success is false, the non-matching term.
-
-
Constructor Details
-
AppendResult
public AppendResult() -
AppendResult
-
AppendResult
-
-
Method Details
-
success
public boolean success() -
index
public long index() -
commitIndex
public long commitIndex() -
nonMatchingTerm
public long nonMatchingTerm() -
commitIndex
-
size
public int size() -
writeTo
- Specified by:
writeToin interfaceorg.jgroups.util.Streamable- Throws:
IOException
-
readFrom
- Specified by:
readFromin interfaceorg.jgroups.util.Streamable- Throws:
IOException
-
toString
-