X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-akka-raft%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fraft%2FReplicatedLogEntry.java;h=1348ffca9163adf786d4f715fce3ddf858605548;hp=19796097364f3a2d321b11edb281834055f97a16;hb=a66b0a0f12639e4cfb43bb92602407f09b849c3f;hpb=0230f37066dfd974accaf36bc712d6f1e60637d0 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 1979609736..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,36 +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 { /** - * The data stored in that entry + * Returns the payload/data to be replicated. * - * @return + * @return the payload/data */ Payload getData(); /** - * The term stored in that entry + * Returns the term of the entry. * - * @return + * @return the term */ long getTerm(); /** - * The index of the entry + * Returns the index of the entry. * - * @return + * @return the index */ long getIndex(); /** - * The size of the entry in bytes. + * Returns the size of the entry in bytes. An approximate number may be good enough. * - * An approximate number may be good enough. - * - * @return + * @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); }