public static class RaftPartitionGroup.Builder extends PartitionGroup.Builder<RaftPartitionGroupConfig>
| Modifier and Type | Method and Description |
|---|---|
RaftPartitionGroup |
build() |
RaftPartitionGroup.Builder |
withDataDirectory(java.io.File dataDir)
Sets the path to the data directory.
|
RaftPartitionGroup.Builder |
withFlushOnCommit()
Enables flush on commit.
|
RaftPartitionGroup.Builder |
withFlushOnCommit(boolean flushOnCommit)
Sets whether to flush logs to disk on commit.
|
RaftPartitionGroup.Builder |
withMaxEntrySize(int maxEntrySize)
Sets the maximum Raft log entry size.
|
RaftPartitionGroup.Builder |
withMaxEntrySize(io.atomix.utils.memory.MemorySize maxEntrySize)
Sets the maximum Raft log entry size.
|
RaftPartitionGroup.Builder |
withMembers(java.util.Collection<java.lang.String> members)
Sets the Raft partition group members.
|
RaftPartitionGroup.Builder |
withMembers(Member... members)
Sets the Raft partition group members.
|
RaftPartitionGroup.Builder |
withMembers(MemberId... members)
Sets the Raft partition group members.
|
RaftPartitionGroup.Builder |
withMembers(java.lang.String... members)
Sets the Raft partition group members.
|
RaftPartitionGroup.Builder |
withNumPartitions(int numPartitions)
Sets the number of partitions.
|
RaftPartitionGroup.Builder |
withPartitionSize(int partitionSize)
Sets the partition size.
|
RaftPartitionGroup.Builder |
withSegmentSize(long segmentSizeBytes)
Sets the segment size.
|
RaftPartitionGroup.Builder |
withSegmentSize(io.atomix.utils.memory.MemorySize segmentSize)
Sets the segment size.
|
RaftPartitionGroup.Builder |
withStorageLevel(StorageLevel storageLevel)
Sets the storage level.
|
public RaftPartitionGroup.Builder withMembers(java.lang.String... members)
members - the Raft partition group membersjava.lang.NullPointerException - if the members are nullpublic RaftPartitionGroup.Builder withMembers(MemberId... members)
members - the Raft partition group membersjava.lang.NullPointerException - if the members are nullpublic RaftPartitionGroup.Builder withMembers(Member... members)
members - the Raft partition group membersjava.lang.NullPointerException - if the members are nullpublic RaftPartitionGroup.Builder withMembers(java.util.Collection<java.lang.String> members)
members - the Raft partition group membersjava.lang.NullPointerException - if the members are nullpublic RaftPartitionGroup.Builder withNumPartitions(int numPartitions)
numPartitions - the number of partitionsjava.lang.IllegalArgumentException - if the number of partitions is not positivepublic RaftPartitionGroup.Builder withPartitionSize(int partitionSize)
partitionSize - the partition sizejava.lang.IllegalArgumentException - if the partition size is not positivepublic RaftPartitionGroup.Builder withStorageLevel(StorageLevel storageLevel)
storageLevel - the storage levelpublic RaftPartitionGroup.Builder withDataDirectory(java.io.File dataDir)
dataDir - the path to the replica's data directorypublic RaftPartitionGroup.Builder withSegmentSize(io.atomix.utils.memory.MemorySize segmentSize)
segmentSize - the segment sizepublic RaftPartitionGroup.Builder withSegmentSize(long segmentSizeBytes)
segmentSizeBytes - the segment size in bytespublic RaftPartitionGroup.Builder withMaxEntrySize(io.atomix.utils.memory.MemorySize maxEntrySize)
maxEntrySize - the maximum Raft log entry sizepublic RaftPartitionGroup.Builder withMaxEntrySize(int maxEntrySize)
maxEntrySize - the maximum Raft log entry sizepublic RaftPartitionGroup.Builder withFlushOnCommit()
public RaftPartitionGroup.Builder withFlushOnCommit(boolean flushOnCommit)
flushOnCommit - whether to flush logs to disk on commitpublic RaftPartitionGroup build()
Copyright © 2013-2019. All Rights Reserved.