Interface ReplicatedLogEntry
- All Superinterfaces:
RaftEntryMeta
- All Known Implementing Classes:
SimpleReplicatedLogEntry
Represents one entry in the replicated log.
-
Method Summary
Modifier and TypeMethodDescriptiongetData()Returns the payload/data to be replicated.default longgetIndex()Deprecated, for removal: This API element is subject to removal in a future version.default longgetTerm()Deprecated, for removal: This API element is subject to removal in a future version.UseRaftEntryMeta.term()istead.booleanChecks if persistence is pending for this entry.intReturn the estimate of serialized size of this entry when passed through serialization.voidsetPersistencePending(boolean pending) Sets whether or not persistence is pending for this entry.intsize()Returns the size of the entry in bytes.Methods inherited from interface org.opendaylight.controller.cluster.raft.RaftEntryMeta
index, term
-
Method Details
-
getData
Payload getData()Returns the payload/data to be replicated.- Returns:
- the payload/data
-
getTerm
Deprecated, for removal: This API element is subject to removal in a future version.UseRaftEntryMeta.term()istead.Returns the term of the entry.- Returns:
- the term
-
getIndex
Deprecated, for removal: This API element is subject to removal in a future version.UseRaftEntryMeta.index()istead.Returns the index of the entry.- Returns:
- the index
-
size
int size()Returns the size of the entry in bytes. An approximate number may be good enough.- Returns:
- the size of the entry in bytes.
-
serializedSize
int serializedSize()Return the estimate of serialized size of this entry when passed through serialization. The estimate needs to be reasonably accurate and should err on the side of caution and report a slightly-higher size in face of uncertainty.- Returns:
- An estimate of serialized size.
-
isPersistencePending
boolean isPersistencePending()Checks if persistence is pending for this entry.- Returns:
- true if persistence is pending, false otherwise.
-
setPersistencePending
void setPersistencePending(boolean pending) Sets whether or not persistence is pending for this entry.- Parameters:
pending- the new setting.
-
RaftEntryMeta.index()istead.