Separate out {From,To}ByteBufMapper
[controller.git] / atomix-storage / src / main / java / io / atomix / storage / journal / JournalWriter.java
index ba7c5821aa0d014c5328b8903234fa4343dd0e5a..649e43e4efda36051f50d28a6cbe44076978219e 100644 (file)
@@ -23,13 +23,6 @@ import org.eclipse.jdt.annotation.NonNull;
  * @author <a href="http://github.com/kuujo">Jordan Halterman</a>
  */
 public interface JournalWriter<E> {
-    /**
-     * Returns the last written index.
-     *
-     * @return The last written index.
-     */
-    long getLastIndex();
-
     /**
      * Returns the next index to be written.
      *
@@ -55,19 +48,11 @@ 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);
 
-    /**
-     * Truncates the log to the given index.
-     *
-     * @param index The index to which to truncate the log.
-     */
-    // FIXME: reconcile with reset()
-    void truncate(long index);
-
     /**
      * Flushes written entries to disk.
      */