Bug 6587: Retain state when transitioning between Leader and IsolatedLeader
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / ReplicatedLogEntry.java
index 3bbaa2283836fb24bd221a14d21bb7e250dfa14e..1bced2404dea9161ae64dc2f0cee0d37e0a2d677 100644 (file)
@@ -8,28 +8,33 @@
 
 package org.opendaylight.controller.cluster.raft;
 
+import org.opendaylight.controller.cluster.raft.protobuff.client.messages.Payload;
+
 /**
  * Represents one entry in the replicated log
  */
 public interface ReplicatedLogEntry {
     /**
-     * The data stored in that entry
      *
-     * @return
+     * @return The payload/data to be replicated
      */
-    Object getData();
+    Payload getData();
 
     /**
-     * The term stored in that entry
      *
-     * @return
+     * @return The term of the entry
      */
     long getTerm();
 
     /**
-     * The index of the entry
      *
-     * @return
+     * @return The index of the entry
      */
     long getIndex();
+
+    /**
+     *
+     * @return The size of the entry in bytes. An approximate number may be good enough.
+     */
+    int size();
 }