X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-akka-raft%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fraft%2FReplicatedLogEntry.java;h=1348ffca9163adf786d4f715fce3ddf858605548;hb=4ecb8ecaf04594b3312a44d801423f515ea445b3;hp=1bced2404dea9161ae64dc2f0cee0d37e0a2d677;hpb=81236f34ad88ffcb71c8d7cdb15b82bad2e50251;p=controller.git diff --git a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/ReplicatedLogEntry.java b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/ReplicatedLogEntry.java index 1bced2404d..1348ffca91 100644 --- a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/ReplicatedLogEntry.java +++ b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/ReplicatedLogEntry.java @@ -11,30 +11,48 @@ package org.opendaylight.controller.cluster.raft; import org.opendaylight.controller.cluster.raft.protobuff.client.messages.Payload; /** - * Represents one entry in the replicated log + * Represents one entry in the replicated log. */ public interface ReplicatedLogEntry { /** + * Returns the payload/data to be replicated. * - * @return The payload/data to be replicated + * @return the payload/data */ Payload getData(); /** + * Returns the term of the entry. * - * @return The term of the entry + * @return the term */ long getTerm(); /** + * Returns the index of the entry. * - * @return The index of the entry + * @return the index */ long getIndex(); /** + * Returns the size of the entry in bytes. An approximate number may be good enough. * - * @return The size of the entry in bytes. An approximate number may be good enough. + * @return the size of the entry in bytes. */ int size(); + + /** + * Checks if persistence is pending for this entry. + * + * @return true if persistence is pending, false otherwise. + */ + boolean isPersistencePending(); + + /** + * Sets whether or not persistence is pending for this entry. + * + * @param pending the new setting. + */ + void setPersistencePending(boolean pending); }