Remove JournalReader.getCurrentEntry() 71/111471/3
authorRobert Varga <robert.varga@pantheon.tech>
Sun, 21 Apr 2024 12:51:20 +0000 (14:51 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Sun, 21 Apr 2024 17:56:11 +0000 (19:56 +0200)
commit5eaf0a77b90c04d4a26f403c1fbf824bf8d6ed0f
tree7c4cf8a9007955f0f4e6220bb861956831dfe20c
parentf2a918522421164b7ca3cc06e1863cd30f759a5f
Remove JournalReader.getCurrentEntry()

JournalReader.currentEntry is just a single-entry cache which is not
used anywhere but tests. Remove the public method and private field.

While we are at it, make SegmentedJournalReader.tryNext() state
index management more obvious.

JIRA: CONTROLLER-2115
Change-Id: If92293e8393e71a4c1f402a0370973872a9593ac
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
atomix-storage/src/main/java/io/atomix/storage/journal/JournalReader.java
atomix-storage/src/main/java/io/atomix/storage/journal/SegmentedJournalReader.java
atomix-storage/src/test/java/io/atomix/storage/journal/AbstractJournalTest.java