java.lang.Object
org.jgroups.protocols.raft.LogEntries
- All Implemented Interfaces:
Iterable<LogEntry>,org.jgroups.util.SizeStreamable,org.jgroups.util.Streamable
public class LogEntries
extends Object
implements org.jgroups.util.SizeStreamable, Iterable<LogEntry>
List of
Format:
LogEntry elements, provides efficient serialization. Used mainly in AppendEntriesRequest
messages. Note that this class is unsynchronized, as it is intended to be used by a single thread.
Format:
| num-elements | log-entry0 | log-entry1 ... | log-entryN |
- Since:
- 1.0.8
- Author:
- Bela Ban
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclear()static LogEntriesiterator()voidintintsize()LogEntry[]toArray()toString()longvoidwriteTo(DataOutput out) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
entries
-
-
Constructor Details
-
LogEntries
public LogEntries()
-
-
Method Details
-
add
-
create
-
clear
-
iterator
-
size
public int size() -
toArray
-
totalSize
public long totalSize() -
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:
IOExceptionClassNotFoundException
-
toString
-