java.lang.Object
org.jgroups.Header
org.jgroups.protocols.raft.RaftHeader
- All Implemented Interfaces:
org.jgroups.Constructable<org.jgroups.Header>,org.jgroups.util.SizeStreamable,org.jgroups.util.Streamable
- Direct Known Subclasses:
AppendEntriesRequest,AppendEntriesResponse,InstallSnapshotRequest
public abstract class RaftHeader
extends org.jgroups.Header
- Since:
- 0.1
- Author:
- Bela Ban
-
Field Summary
FieldsFields inherited from class org.jgroups.Header
prot_id -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongcurrTerm()currTerm(long t) voidinttoString()voidwriteTo(DataOutput out) Methods inherited from class org.jgroups.Header
getMagicId, getProtId, setProtIdMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jgroups.Constructable
create
-
Field Details
-
curr_term
protected long curr_term
-
-
Constructor Details
-
RaftHeader
public RaftHeader() -
RaftHeader
public RaftHeader(long curr_term)
-
-
Method Details
-
currTerm
public long currTerm() -
currTerm
-
serializedSize
public int serializedSize() -
writeTo
- Throws:
IOException
-
readFrom
- Throws:
IOExceptionClassNotFoundException
-
toString
- Overrides:
toStringin classorg.jgroups.Header
-