Remove unneeded SuppressWarnings
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / ReplicatedLogEntry.java
index 3bbaa2283836fb24bd221a14d21bb7e250dfa14e..1348ffca9163adf786d4f715fce3ddf858605548 100644 (file)
@@ -8,28 +8,51 @@
 
 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
      */
-    Object getData();
+    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();
+
+    /**
+     * Returns 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);
 }