public class AtomixBuilder extends AtomixClusterBuilder
| Modifier and Type | Method and Description |
|---|---|
AtomixBuilder |
addPartitionGroup(ManagedPartitionGroup partitionGroup)
Adds a partition group.
|
AtomixBuilder |
addProfile(Profile profile)
Adds an Atomix profile.
|
Atomix |
build()
Builds a new Atomix instance.
|
AtomixBuilder |
setBroadcastInterval(Duration interval)
Sets the reachability broadcast interval.
|
AtomixBuilder |
setReachabilityThreshold(int threshold)
Sets the reachability failure detection threshold.
|
AtomixBuilder |
withAddress(Address address)
Sets the member address.
|
AtomixBuilder |
withAddress(int port)
Sets the member address using local host.
|
AtomixBuilder |
withAddress(String address)
Sets the member address.
|
AtomixBuilder |
withAddress(String host,
int port)
Sets the member host/port.
|
AtomixBuilder |
withClusterId(String clusterId)
Sets the cluster identifier.
|
AtomixBuilder |
withHost(String host)
Sets the host to which the member belongs.
|
AtomixBuilder |
withManagementGroup(ManagedPartitionGroup systemManagementGroup)
Sets the system management partition group.
|
AtomixBuilder |
withMemberId(MemberId localMemberId)
Sets the local member identifier.
|
AtomixBuilder |
withMemberId(String localMemberId)
Sets the local member identifier.
|
AtomixBuilder |
withMembershipProvider(NodeDiscoveryProvider locationProvider)
Sets the membership provider.
|
AtomixBuilder |
withMulticastAddress(Address address)
Sets the multicast address.
|
AtomixBuilder |
withMulticastEnabled()
Enables multicast node discovery.
|
AtomixBuilder |
withMulticastEnabled(boolean multicastEnabled)
Sets whether multicast node discovery is enabled.
|
AtomixBuilder |
withPartitionGroups(Collection<ManagedPartitionGroup> partitionGroups)
Sets the partition groups.
|
AtomixBuilder |
withPartitionGroups(ManagedPartitionGroup... partitionGroups)
Sets the partition groups.
|
AtomixBuilder |
withProfiles(Collection<Profile> profiles)
Sets the Atomix profiles.
|
AtomixBuilder |
withProfiles(Profile... profiles)
Sets the Atomix profiles.
|
AtomixBuilder |
withProperties(Properties properties)
Sets the member properties.
|
AtomixBuilder |
withProperty(String key,
String value)
Sets a property of the member.
|
AtomixBuilder |
withRack(String rack)
Sets the rack to which the member belongs.
|
AtomixBuilder |
withReachabilityTimeout(Duration timeout)
Sets the reachability failure timeout.
|
AtomixBuilder |
withShutdownHook(boolean enabled)
Enables the shutdown hook.
|
AtomixBuilder |
withShutdownHookEnabled()
Enables the shutdown hook.
|
AtomixBuilder |
withZone(String zone)
Sets the zone to which the member belongs.
|
public AtomixBuilder withShutdownHookEnabled()
public AtomixBuilder withShutdownHook(boolean enabled)
enabled - if true a shutdown hook will be registeredpublic AtomixBuilder withProfiles(Profile... profiles)
profiles - the profilespublic AtomixBuilder withProfiles(Collection<Profile> profiles)
profiles - the profilespublic AtomixBuilder addProfile(Profile profile)
profile - the profile to addpublic AtomixBuilder withManagementGroup(ManagedPartitionGroup systemManagementGroup)
systemManagementGroup - the system management partition grouppublic AtomixBuilder withPartitionGroups(ManagedPartitionGroup... partitionGroups)
partitionGroups - the partition groupsNullPointerException - if the partition groups are nullpublic AtomixBuilder withPartitionGroups(Collection<ManagedPartitionGroup> partitionGroups)
partitionGroups - the partition groupsNullPointerException - if the partition groups are nullpublic AtomixBuilder addPartitionGroup(ManagedPartitionGroup partitionGroup)
partitionGroup - the partition group to addNullPointerException - if the partition group is nullpublic AtomixBuilder withClusterId(String clusterId)
AtomixClusterBuilderwithClusterId in class AtomixClusterBuilderclusterId - the cluster identifierpublic AtomixBuilder withMemberId(String localMemberId)
AtomixClusterBuilderwithMemberId in class AtomixClusterBuilderlocalMemberId - the local member identifierpublic AtomixBuilder withMemberId(MemberId localMemberId)
AtomixClusterBuilderwithMemberId in class AtomixClusterBuilderlocalMemberId - the local member identifierpublic AtomixBuilder withAddress(String address)
AtomixClusterBuilderwithAddress in class AtomixClusterBuilderaddress - a host:port tuplepublic AtomixBuilder withAddress(String host, int port)
AtomixClusterBuilderwithAddress in class AtomixClusterBuilderhost - the host nameport - the port numberpublic AtomixBuilder withAddress(int port)
AtomixClusterBuilderwithAddress in class AtomixClusterBuilderport - the port numberpublic AtomixBuilder withAddress(Address address)
AtomixClusterBuilderwithAddress in class AtomixClusterBuilderaddress - the member addresspublic AtomixBuilder withZone(String zone)
AtomixClusterBuilderwithZone in class AtomixClusterBuilderzone - the zone to which the member belongspublic AtomixBuilder withRack(String rack)
AtomixClusterBuilderwithRack in class AtomixClusterBuilderrack - the rack to which the member belongspublic AtomixBuilder withHost(String host)
AtomixClusterBuilderwithHost in class AtomixClusterBuilderhost - the host to which the member belongspublic AtomixBuilder withProperties(Properties properties)
AtomixClusterBuilderwithProperties in class AtomixClusterBuilderproperties - the member propertiespublic AtomixBuilder withProperty(String key, String value)
AtomixClusterBuilderwithProperty in class AtomixClusterBuilderkey - the property key to setvalue - the property value to setpublic AtomixBuilder withMulticastEnabled()
AtomixClusterBuilderwithMulticastEnabled in class AtomixClusterBuilderpublic AtomixBuilder withMulticastEnabled(boolean multicastEnabled)
AtomixClusterBuilderwithMulticastEnabled in class AtomixClusterBuildermulticastEnabled - whether to enable multicast node discoverypublic AtomixBuilder withMulticastAddress(Address address)
AtomixClusterBuilderwithMulticastAddress in class AtomixClusterBuilderaddress - the multicast addresspublic AtomixBuilder withMembershipProvider(NodeDiscoveryProvider locationProvider)
AtomixClusterBuilderwithMembershipProvider in class AtomixClusterBuilderlocationProvider - the membership providerpublic AtomixBuilder setBroadcastInterval(Duration interval)
AtomixClusterBuildersetBroadcastInterval in class AtomixClusterBuilderinterval - the reachability broadcast intervalpublic AtomixBuilder setReachabilityThreshold(int threshold)
AtomixClusterBuildersetReachabilityThreshold in class AtomixClusterBuilderthreshold - the reachability failure detection thresholdpublic AtomixBuilder withReachabilityTimeout(Duration timeout)
AtomixClusterBuilderwithReachabilityTimeout in class AtomixClusterBuildertimeout - the reachability failure timeoutpublic Atomix build()
build in interface Builder<AtomixCluster>build in class AtomixClusterBuilderCopyright © 2013–2018. All rights reserved.