Refactor SegmentedJournalWriter.reset()
[controller.git] / atomix-storage / src / main / java / io / atomix / storage / journal / ByteBufWriter.java
index 7211a8844d12a47058b22b27cd60d780d80cb521..2f85cc6163522b18ac9e8465ec1a99b45a629c67 100644 (file)
@@ -56,9 +56,9 @@ public interface ByteBufWriter {
     /**
      * 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()
     // FIXME: throws IOException
     void reset(long index);
 
@@ -66,6 +66,7 @@ public interface ByteBufWriter {
      * 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()
     // FIXME: throws IOException