Retain RandomAccessFile in JournalSegmentFile 27/111627/4
authorRobert Varga <robert.varga@pantheon.tech>
Sun, 5 May 2024 21:24:58 +0000 (23:24 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Sun, 5 May 2024 22:49:02 +0000 (00:49 +0200)
commitece1376a462788f613f27ac5b099f364896de773
tree8eb79a4832e5ae2c74d3f1f4fca535a866bdaf3a
parent3526a7735a3fbe62773d5edd23290e5e4d94b197
Retain RandomAccessFile in JournalSegmentFile

Having a RandomAccessFile is nice, as it internally holds a FileChannel.
This makes our files stateful -- which is okay, as we still manage their
lifecycle via JournalSegment.

JIRA: CONTROLLER-2099
Change-Id: Id8305c74dbd881eaf52d84191c11bb4ea2bc164b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
atomix-storage/src/main/java/io/atomix/storage/journal/DiskFileReader.java
atomix-storage/src/main/java/io/atomix/storage/journal/DiskFileWriter.java
atomix-storage/src/main/java/io/atomix/storage/journal/FileReader.java
atomix-storage/src/main/java/io/atomix/storage/journal/FileWriter.java
atomix-storage/src/main/java/io/atomix/storage/journal/JournalSegment.java
atomix-storage/src/main/java/io/atomix/storage/journal/JournalSegmentDescriptor.java
atomix-storage/src/main/java/io/atomix/storage/journal/JournalSegmentFile.java
atomix-storage/src/main/java/io/atomix/storage/journal/MappedFileWriter.java
atomix-storage/src/main/java/io/atomix/storage/journal/SegmentedJournal.java