Class PreVoteResponse
java.lang.Object
org.jgroups.Header
org.jgroups.protocols.raft.RaftHeader
org.jgroups.protocols.raft.election.PreVoteResponse
- All Implemented Interfaces:
org.jgroups.Constructable<org.jgroups.Header>,org.jgroups.util.SizeStreamable,org.jgroups.util.Streamable
Utilized during the pre-voting phase to return information about the current seen leader.
- Since:
- 1.0.12
- Author:
- José Bolina
-
Field Summary
FieldsFields inherited from class org.jgroups.protocols.raft.RaftHeader
curr_termFields inherited from class org.jgroups.Header
prot_id -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.jgroups.protocols.raft.RaftHeader
currTerm, currTermMethods inherited from class org.jgroups.Header
getProtId, setProtId
-
Field Details
-
leader
protected org.jgroups.Address leader
-
-
Constructor Details
-
PreVoteResponse
public PreVoteResponse() -
PreVoteResponse
public PreVoteResponse(org.jgroups.Address leader)
-
-
Method Details
-
leader
public org.jgroups.Address leader() -
readFrom
- Specified by:
readFromin interfaceorg.jgroups.util.Streamable- Overrides:
readFromin classRaftHeader- Throws:
IOExceptionClassNotFoundException
-
writeTo
- Specified by:
writeToin interfaceorg.jgroups.util.Streamable- Overrides:
writeToin classRaftHeader- Throws:
IOException
-
serializedSize
public int serializedSize()- Specified by:
serializedSizein interfaceorg.jgroups.util.SizeStreamable- Overrides:
serializedSizein classRaftHeader
-
getMagicId
public short getMagicId()- Specified by:
getMagicIdin classorg.jgroups.Header
-
create
-
toString
- Overrides:
toStringin classRaftHeader
-