Hide JournalSegment 87/110587/3
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 11 Mar 2024 10:02:19 +0000 (11:02 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 11 Mar 2024 12:51:31 +0000 (13:51 +0100)
JournalSegment is an implementation detail, which we do not want to leak
to the outside world. Hide it an make it final.

JIRA: CONTROLLER-2098
Change-Id: Ife71005f481c7ffb3c2eb6b89d3c5afa5e7f1609
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
atomix-storage/src/main/java/io/atomix/storage/journal/JournalSegment.java
opendaylight/md-sal/sal-akka-segmented-journal/src/main/java/org/opendaylight/controller/akka/segjournal/DataJournalEntry.java

index 48f6ead66ce02439ec7d0f6877651811736434f7..f67b4cc1b7d2bc2db1d04469a2f5f18015105666 100644 (file)
@@ -34,7 +34,7 @@ import static com.google.common.base.Preconditions.checkState;
  *
  * @author <a href="http://github.com/kuujo">Jordan Halterman</a>
  */
-public class JournalSegment<E> implements AutoCloseable {
+final class JournalSegment<E> implements AutoCloseable {
   private final JournalSegmentFile file;
   private final JournalSegmentDescriptor descriptor;
   private final StorageLevel storageLevel;
@@ -47,7 +47,7 @@ public class JournalSegment<E> implements AutoCloseable {
   private final FileChannel channel;
   private boolean open = true;
 
-  public JournalSegment(
+  JournalSegment(
       JournalSegmentFile file,
       JournalSegmentDescriptor descriptor,
       StorageLevel storageLevel,
index e0321b35d621db364ad7a5f932be0939d72d52c2..fdd0b80d03c7a8ae24afac26b655e092a3afb1c4 100644 (file)
@@ -10,12 +10,11 @@ package org.opendaylight.controller.akka.segjournal;
 import static java.util.Objects.requireNonNull;
 
 import akka.persistence.PersistentRepr;
-import io.atomix.storage.journal.JournalSegment;
 
 /**
  * A single entry in the data journal. We do not store {@code persistenceId} for each entry, as that is a
- * journal-invariant, nor do we store {@code sequenceNr}, as that information is maintained by {@link JournalSegment}'s
- * index.
+ * journal-invariant, nor do we store {@code sequenceNr}, as that information is maintained by a particular journal
+ * segment's index.
  */
 abstract sealed class DataJournalEntry {
     /**