Refactor SegmentedJournalWriter.reset()
[controller.git] / atomix-storage / src / main / java / io / atomix / storage / journal / JournalWriter.java
index ba7c5821aa0d014c5328b8903234fa4343dd0e5a..ae6577818594229f9c394fbf06018269fea318be 100644 (file)
@@ -55,7 +55,8 @@ public interface JournalWriter<E> {
     /**
      * Resets the head of the journal to the given index.
      *
-     * @param index the index to which to reset the head of the journal
+     * @param index the next index to write
+     * @throws IndexOutOfBoundsException if the journal cannot be reset to specified index
      */
     // FIXME: reconcile with reader's reset and truncate()
     void reset(long index);
@@ -64,6 +65,7 @@ public interface JournalWriter<E> {
      * Truncates the log to the given index.
      *
      * @param index The index to which to truncate the log.
+     * @throws IndexOutOfBoundsException if the journal cannot be reset to specified index
      */
     // FIXME: reconcile with reset()
     void truncate(long index);