java.lang.Object
org.jgroups.protocols.raft.LogEntry
- All Implemented Interfaces:
org.jgroups.util.SizeStreamable,org.jgroups.util.Streamable
An element in a log. Captures the term and command to be applied to the state machine
- Since:
- 0.1
- Author:
- Bela Ban
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
term
protected long term -
command
protected byte[] command -
offset
protected int offset -
length
protected int length -
internal
protected boolean internal
-
-
Constructor Details
-
LogEntry
public LogEntry() -
LogEntry
public LogEntry(long term, byte[] command) -
LogEntry
public LogEntry(long term, byte[] command, int offset, int length) -
LogEntry
public LogEntry(long term, byte[] command, int offset, int length, boolean internal)
-
-
Method Details
-
term
public long term() -
term
-
command
public byte[] command() -
offset
public int offset() -
length
public int length() -
internal
public boolean internal() -
internal
-
serializedSize
public int serializedSize()- Specified by:
serializedSizein interfaceorg.jgroups.util.SizeStreamable
-
writeTo
- Specified by:
writeToin interfaceorg.jgroups.util.Streamable- Throws:
IOException
-
readFrom
- Specified by:
readFromin interfaceorg.jgroups.util.Streamable- Throws:
IOException
-
toString
-