public static class RaftPartitionGroup.Builder extends PartitionGroup.Builder<RaftPartitionGroupConfig>
| Modifier and Type | Method and Description |
|---|---|
RaftPartitionGroup |
build()
Builds the object.
|
RaftPartitionGroup.Builder |
withDataDirectory(File dataDir)
Sets the path to the data directory.
|
RaftPartitionGroup.Builder |
withMembers(Collection<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(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 |
withStorageLevel(StorageLevel storageLevel)
Sets the storage level.
|
public RaftPartitionGroup.Builder withMembers(String... members)
members - the Raft partition group membersNullPointerException - if the members are nullpublic RaftPartitionGroup.Builder withMembers(MemberId... members)
members - the Raft partition group membersNullPointerException - if the members are nullpublic RaftPartitionGroup.Builder withMembers(Member... members)
members - the Raft partition group membersNullPointerException - if the members are nullpublic RaftPartitionGroup.Builder withMembers(Collection<String> members)
members - the Raft partition group membersNullPointerException - if the members are nullpublic RaftPartitionGroup.Builder withNumPartitions(int numPartitions)
numPartitions - the number of partitionsIllegalArgumentException - if the number of partitions is not positivepublic RaftPartitionGroup.Builder withPartitionSize(int partitionSize)
partitionSize - the partition sizeIllegalArgumentException - if the partition size is not positivepublic RaftPartitionGroup.Builder withStorageLevel(StorageLevel storageLevel)
storageLevel - the storage levelpublic RaftPartitionGroup.Builder withDataDirectory(File dataDir)
dataDir - the path to the replica's data directorypublic RaftPartitionGroup build()
BuilderThe returned object may be a new instance of the built class or a recycled instance, depending on the semantics of the builder implementation. Users should never assume that a builder allocates a new instance.
Copyright © 2013–2018. All rights reserved.