Refactor SegmentedJournalWriter.reset() 46/111646/2
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 7 May 2024 13:11:23 +0000 (15:11 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 7 May 2024 23:44:43 +0000 (01:44 +0200)
commit7997055cc3a82e0bfe753a4e2dbcd8af59d9113d
tree08bf140775b99e89c81b08195f3970fda804a5e6
parentc60f40bb075bee81e6a3977a620a1b7b4e0550cd
Refactor SegmentedJournalWriter.reset()

We have two methods reset() and truncate(), both of which take an index,
without a real documented distinction.

Document reset() as taking the index to read/write next and instantiate
a guard against attempts to use reset(0) -- as 0 is not a valid next
index.

JIRA: CONTROLLER-2100
Change-Id: I8a6b366fdb0827ab3cd5a494e7e9f5a741983264
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
atomix-storage/src/main/java/io/atomix/storage/journal/ByteBufReader.java
atomix-storage/src/main/java/io/atomix/storage/journal/ByteBufWriter.java
atomix-storage/src/main/java/io/atomix/storage/journal/JournalReader.java
atomix-storage/src/main/java/io/atomix/storage/journal/JournalWriter.java
atomix-storage/src/main/java/io/atomix/storage/journal/SegmentedByteBufWriter.java
atomix-storage/src/main/java/io/atomix/storage/journal/SegmentedJournalWriter.java