Package io.atomix.cluster.protocol
Class SwimMembershipProtocolBuilder
java.lang.Object
io.atomix.cluster.protocol.GroupMembershipProtocolBuilder
io.atomix.cluster.protocol.SwimMembershipProtocolBuilder
- All Implemented Interfaces:
io.atomix.utils.Builder<GroupMembershipProtocol>
public class SwimMembershipProtocolBuilder extends GroupMembershipProtocolBuilder
SWIM membership protocol builder.
-
Constructor Summary
Constructors Constructor Description SwimMembershipProtocolBuilder() -
Method Summary
Modifier and Type Method Description GroupMembershipProtocolbuild()SwimMembershipProtocolBuilderwithBroadcastDisputes(boolean broadcastDisputes)Sets whether to broadcast disputes to all peers.SwimMembershipProtocolBuilderwithBroadcastUpdates(boolean broadcastUpdates)Sets whether to broadcast member updates to all peers.SwimMembershipProtocolBuilderwithFailureTimeout(java.time.Duration failureTimeout)Sets the failure timeout to use prior to phi failure detectors being populated.SwimMembershipProtocolBuilderwithGossipFanout(int gossipFanout)Sets the gossip fanout.SwimMembershipProtocolBuilderwithGossipInterval(java.time.Duration gossipInterval)Sets the gossip interval.SwimMembershipProtocolBuilderwithNotifySuspect(boolean notifySuspect)Sets whether to notify a suspect node on state changes.SwimMembershipProtocolBuilderwithProbeInterval(java.time.Duration probeInterval)Sets the probe interval.SwimMembershipProtocolBuilderwithSuspectProbes(int suspectProbes)Sets the number of probes to perform on suspect members.
-
Constructor Details
-
SwimMembershipProtocolBuilder
public SwimMembershipProtocolBuilder()
-
-
Method Details
-
withBroadcastUpdates
Sets whether to broadcast member updates to all peers.- Parameters:
broadcastUpdates- whether to broadcast member updates to all peers- Returns:
- the protocol builder
-
withBroadcastDisputes
Sets whether to broadcast disputes to all peers.- Parameters:
broadcastDisputes- whether to broadcast disputes to all peers- Returns:
- the protocol builder
-
withNotifySuspect
Sets whether to notify a suspect node on state changes.- Parameters:
notifySuspect- whether to notify a suspect node on state changes- Returns:
- the protocol builder
-
withGossipInterval
Sets the gossip interval.- Parameters:
gossipInterval- the gossip interval- Returns:
- the protocol builder
-
withGossipFanout
Sets the gossip fanout.- Parameters:
gossipFanout- the gossip fanout- Returns:
- the protocol builder
-
withProbeInterval
Sets the probe interval.- Parameters:
probeInterval- the probe interval- Returns:
- the protocol builder
-
withSuspectProbes
Sets the number of probes to perform on suspect members.- Parameters:
suspectProbes- the number of probes to perform on suspect members- Returns:
- the protocol builder
-
withFailureTimeout
Sets the failure timeout to use prior to phi failure detectors being populated.- Parameters:
failureTimeout- the failure timeout- Returns:
- the protocol builder
-
build
-