Class SwimMembershipProtocolBuilder

java.lang.Object
io.atomix.cluster.protocol.GroupMembershipProtocolBuilder
io.atomix.cluster.protocol.SwimMembershipProtocolBuilder
All Implemented Interfaces:
Builder<GroupMembershipProtocol>

public class SwimMembershipProtocolBuilder extends GroupMembershipProtocolBuilder
SWIM membership protocol builder.
  • Constructor Details

    • SwimMembershipProtocolBuilder

      public SwimMembershipProtocolBuilder(io.micrometer.core.instrument.MeterRegistry meterRegistry)
  • Method Details

    • withBroadcastUpdates

      public SwimMembershipProtocolBuilder withBroadcastUpdates(boolean broadcastUpdates)
      Sets whether to broadcast member updates to all peers.
      Parameters:
      broadcastUpdates - whether to broadcast member updates to all peers
      Returns:
      the protocol builder
    • withBroadcastDisputes

      public SwimMembershipProtocolBuilder withBroadcastDisputes(boolean broadcastDisputes)
      Sets whether to broadcast disputes to all peers.
      Parameters:
      broadcastDisputes - whether to broadcast disputes to all peers
      Returns:
      the protocol builder
    • withNotifySuspect

      public SwimMembershipProtocolBuilder withNotifySuspect(boolean notifySuspect)
      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

      public SwimMembershipProtocolBuilder withGossipInterval(Duration gossipInterval)
      Sets the gossip interval.
      Parameters:
      gossipInterval - the gossip interval
      Returns:
      the protocol builder
    • withGossipFanout

      public SwimMembershipProtocolBuilder withGossipFanout(int gossipFanout)
      Sets the gossip fanout.
      Parameters:
      gossipFanout - the gossip fanout
      Returns:
      the protocol builder
    • withProbeInterval

      public SwimMembershipProtocolBuilder withProbeInterval(Duration probeInterval)
      Sets the probe interval.
      Parameters:
      probeInterval - the probe interval
      Returns:
      the protocol builder
    • withProbeTimeout

      public SwimMembershipProtocolBuilder withProbeTimeout(Duration probeTimeout)
      Sets the probe timeout
      Parameters:
      probeTimeout -
      Returns:
    • withSuspectProbes

      public SwimMembershipProtocolBuilder withSuspectProbes(int suspectProbes)
      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

      public SwimMembershipProtocolBuilder withFailureTimeout(Duration failureTimeout)
      Sets the failure timeout to use prior to phi failure detectors being populated.
      Parameters:
      failureTimeout - the failure timeout
      Returns:
      the protocol builder
    • withSyncInterval

      public SwimMembershipProtocolBuilder withSyncInterval(Duration syncInterval)
      Sets the sync interval to use to ensure a consistent view of a stable cluster within an upper bound.
      Parameters:
      syncInterval - the interval at which nodes should sync with another, random node
      Returns:
      the protocol builder
    • build

      public GroupMembershipProtocol build()