Class GossipConfig

java.lang.Object
io.scalecube.cluster.gossip.GossipConfig
All Implemented Interfaces:
Cloneable

public final class GossipConfig extends Object implements Cloneable
  • Field Details

    • DEFAULT_GOSSIP_INTERVAL

      public static final long DEFAULT_GOSSIP_INTERVAL
      See Also:
    • DEFAULT_GOSSIP_FANOUT

      public static final int DEFAULT_GOSSIP_FANOUT
      See Also:
    • DEFAULT_GOSSIP_REPEAT_MULT

      public static final int DEFAULT_GOSSIP_REPEAT_MULT
      See Also:
    • GOSSIP_SEGMENTATION_THRESHOLD

      public static final int GOSSIP_SEGMENTATION_THRESHOLD
      See Also:
    • DEFAULT_WAN_GOSSIP_FANOUT

      public static final int DEFAULT_WAN_GOSSIP_FANOUT
      See Also:
    • DEFAULT_LOCAL_GOSSIP_REPEAT_MULT

      public static final int DEFAULT_LOCAL_GOSSIP_REPEAT_MULT
      See Also:
    • DEFAULT_LOCAL_GOSSIP_INTERVAL

      public static final int DEFAULT_LOCAL_GOSSIP_INTERVAL
      See Also:
  • Constructor Details

    • GossipConfig

      public GossipConfig()
  • Method Details

    • defaultConfig

      public static GossipConfig defaultConfig()
    • defaultLanConfig

      public static GossipConfig defaultLanConfig()
      Creates GossipConfig with default settings for cluster on LAN network.
      Returns:
      new GossipConfig
    • defaultWanConfig

      public static GossipConfig defaultWanConfig()
      Creates GossipConfig with default settings for cluster on WAN network.
      Returns:
      new GossipConfig
    • defaultLocalConfig

      public static GossipConfig defaultLocalConfig()
      Creates GossipConfig with default settings for cluster on local loopback interface.
      Returns:
      new GossipConfig
    • gossipFanout

      public GossipConfig gossipFanout(int gossipFanout)
      Setter for gossipFanout.
      Parameters:
      gossipFanout - gossip fanout
      Returns:
      new GossipConfig
    • gossipFanout

      public int gossipFanout()
    • gossipInterval

      public GossipConfig gossipInterval(long gossipInterval)
      Setter for gossipInterval.
      Parameters:
      gossipInterval - gossip interval
      Returns:
      new GossipConfig
    • gossipInterval

      public long gossipInterval()
    • gossipRepeatMult

      public GossipConfig gossipRepeatMult(int gossipRepeatMult)
      Setter for gossipRepeatMult.
      Parameters:
      gossipRepeatMult - gossip repeat multiplier
      Returns:
      new GossipConfig
    • gossipRepeatMult

      public int gossipRepeatMult()
    • gossipSegmentationThreshold

      public GossipConfig gossipSegmentationThreshold(int gossipSegmentationThreshold)
      Setter for gossipSegmentationThreshold.
      Parameters:
      gossipSegmentationThreshold - gossip segmentation threshold
      Returns:
      new GossipConfig
      See Also:
    • gossipSegmentationThreshold

      public int gossipSegmentationThreshold()
      A threshold for received gossip id intervals. If number of intervals is more than threshold then warning will be raised, this mean that node losing network frequently for a long time.

      For example if we received gossip with id 1,2 and 5 then we will have 2 intervals [1, 2], [5, 5].

      Returns:
      gossip segmentation threshold
    • clone

      public GossipConfig clone()
      Overrides:
      clone in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object