Rework JournalSegment writer access 90/110590/4
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 11 Mar 2024 10:45:51 +0000 (11:45 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 11 Mar 2024 12:51:31 +0000 (13:51 +0100)
commitec6312137be61efb00cc03ef745bf6e0af31a0f8
tree8b38e171a89040d0bdde3487eab0a211d25faed5
parentf00cb3b9fb1237ee90b2c8bc07821213b4345fb0
Rework JournalSegment writer access

The only user of JournalSegment.writer() is SegmentedJournalWriter,
which is using acquire/release to guard access to the writer.

Rework these methods so that acquire/release are internal and exposed
functionality is acquireWriter() and releaseWriter().

JIRA: CONTROLLER-2098
Change-Id: I345cec145fd82ee59c525d183584d69a9e599bf9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
atomix-storage/src/main/java/io/atomix/storage/journal/JournalSegment.java
atomix-storage/src/main/java/io/atomix/storage/journal/SegmentedJournalWriter.java