Clean up Segmented(ByteBuf)Journal
[controller.git] / atomix-storage / src / main / java / io / atomix / storage / journal / ByteBufJournal.java
index dc3e75bcde0888fce6e8675696550c0c3ccd7a91..cae71fffcbfbbceefcb13bdb712502db6a645a28 100644 (file)
@@ -53,6 +53,16 @@ public interface ByteBufJournal extends AutoCloseable {
      */
     ByteBufReader openCommitsReader(long index);
 
+    /**
+     * Compacts the journal up to the given index.
+     *
+     * <p>
+     * The semantics of compaction are not specified by this interface.
+     *
+     * @param index The index up to which to compact the journal.
+     */
+    void compact(long index);
+
     @Override
     void close();
 }