Move JournalWriter.getLastIndex()
[controller.git] / atomix-storage / src / main / java / io / atomix / storage / journal / Journal.java
index 93ae0a565bcaa7e1d941c703490f069273329daa..39be7d4d5f7338019f4d41b84ec8e9dd962fae0d 100644 (file)
@@ -23,6 +23,13 @@ import io.atomix.storage.journal.JournalReader.Mode;
  * @author <a href="http://github.com/kuujo">Jordan Halterman</a>
  */
 public interface Journal<E> extends AutoCloseable {
+    /**
+     * Return the index of the last entry in the journal.
+     *
+     * @return the last index, or zero if there are no entries.
+     */
+    long lastIndex();
+
     /**
      * Returns the journal writer.
      *