Improve ByteBuffer invocations 44/110744/1
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 15 Mar 2024 09:58:55 +0000 (10:58 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Fri, 15 Mar 2024 09:59:58 +0000 (10:59 +0100)
commitd65837cffb7128b7a790eca9c73d5d8fabc3da57
treec0f4f27d03aeecb6c75af1e28742f6f18b0d7121
parentbb9ef9945ec33f0025a4a426f44c416fb1e0531f
Improve ByteBuffer invocations

ByteBuffer has a fluent API, returning the same buffer from methods
which do not return something else.

Take advantage of this a chain invocations, resulting in denser byte
code.

JIRA: CONTROLLER-2097
Change-Id: Ic744e5e4f4d8c3fec5026f9d7edc58b7a5387c0e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
atomix-storage/src/main/java/io/atomix/storage/journal/FileChannelJournalSegmentReader.java
atomix-storage/src/main/java/io/atomix/storage/journal/FileChannelJournalSegmentWriter.java