Guard against duplicate log indexes
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / ReplicatedLog.java
index ffa4cb117231f3f603e2cd8a51db3853fd9b2fe8..7ff6e86227451fda3d52ead7bb142e6235d0c52a 100644 (file)
@@ -65,8 +65,10 @@ public interface ReplicatedLog {
      * Appends an entry to the log.
      *
      * @param replicatedLogEntry the entry to append
+     * @return true if the entry was successfully appended, false otherwise. An entry can fail to append if
+     *         the index is already included in the log.
      */
-    void append(ReplicatedLogEntry replicatedLogEntry);
+    boolean append(ReplicatedLogEntry replicatedLogEntry);
 
     /**
      * Optimization method to increase the capacity of the journal log prior to appending entries.