X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=third-party%2Fatomix%2Fstorage%2Fsrc%2Fmain%2Fjava%2Fio%2Fatomix%2Fstorage%2Fjournal%2FSegmentedJournal.java;fp=third-party%2Fatomix%2Fstorage%2Fsrc%2Fmain%2Fjava%2Fio%2Fatomix%2Fstorage%2Fjournal%2FSegmentedJournal.java;h=fed7ab8d3e6c19fc69df5fe3cdc6bd7ff26196f3;hb=1b3ef04cbde0af4bf316a9d0db92937947239d1b;hp=ea5944aabd03f354389d42d7d758b95b0e935094;hpb=506bafaeb6f5664423d04f5cef2fea5fec3918b9;p=controller.git diff --git a/third-party/atomix/storage/src/main/java/io/atomix/storage/journal/SegmentedJournal.java b/third-party/atomix/storage/src/main/java/io/atomix/storage/journal/SegmentedJournal.java index ea5944aabd..fed7ab8d3e 100644 --- a/third-party/atomix/storage/src/main/java/io/atomix/storage/journal/SegmentedJournal.java +++ b/third-party/atomix/storage/src/main/java/io/atomix/storage/journal/SegmentedJournal.java @@ -665,7 +665,7 @@ public final class SegmentedJournal implements Journal { /** * Raft log builder. */ - public static class Builder { + public static final class Builder { private static final boolean DEFAULT_FLUSH_ON_COMMIT = false; private static final String DEFAULT_NAME = "atomix"; private static final String DEFAULT_DIRECTORY = System.getProperty("user.dir"); @@ -673,17 +673,15 @@ public final class SegmentedJournal implements Journal { private static final int DEFAULT_MAX_ENTRY_SIZE = 1024 * 1024; private static final int DEFAULT_MAX_ENTRIES_PER_SEGMENT = 1024 * 1024; private static final double DEFAULT_INDEX_DENSITY = .005; - private static final int DEFAULT_CACHE_SIZE = 1024; - - protected String name = DEFAULT_NAME; - protected StorageLevel storageLevel = StorageLevel.DISK; - protected File directory = new File(DEFAULT_DIRECTORY); - protected Namespace namespace; - protected int maxSegmentSize = DEFAULT_MAX_SEGMENT_SIZE; - protected int maxEntrySize = DEFAULT_MAX_ENTRY_SIZE; - protected int maxEntriesPerSegment = DEFAULT_MAX_ENTRIES_PER_SEGMENT; - protected double indexDensity = DEFAULT_INDEX_DENSITY; - protected int cacheSize = DEFAULT_CACHE_SIZE; + + private String name = DEFAULT_NAME; + private StorageLevel storageLevel = StorageLevel.DISK; + private File directory = new File(DEFAULT_DIRECTORY); + private Namespace namespace; + private int maxSegmentSize = DEFAULT_MAX_SEGMENT_SIZE; + private int maxEntrySize = DEFAULT_MAX_ENTRY_SIZE; + private int maxEntriesPerSegment = DEFAULT_MAX_ENTRIES_PER_SEGMENT; + private double indexDensity = DEFAULT_INDEX_DENSITY; private boolean flushOnCommit = DEFAULT_FLUSH_ON_COMMIT; protected Builder() { @@ -834,7 +832,6 @@ public final class SegmentedJournal implements Journal { @Deprecated public Builder withCacheSize(int cacheSize) { checkArgument(cacheSize >= 0, "cacheSize must be positive"); - this.cacheSize = cacheSize; return this; }