Package io.scalecube.cluster.gossip
Class GossipConfig
java.lang.Object
io.scalecube.cluster.gossip.GossipConfig
- All Implemented Interfaces:
Cloneable
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final longstatic final intstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()static GossipConfigstatic GossipConfigCreatesGossipConfigwith default settings for cluster on LAN network.static GossipConfigCreatesGossipConfigwith default settings for cluster on local loopback interface.static GossipConfigCreatesGossipConfigwith default settings for cluster on WAN network.intgossipFanout(int gossipFanout) Setter forgossipFanout.longgossipInterval(long gossipInterval) Setter forgossipInterval.intgossipRepeatMult(int gossipRepeatMult) Setter forgossipRepeatMult.intA threshold for received gossip id intervals.gossipSegmentationThreshold(int gossipSegmentationThreshold) Setter forgossipSegmentationThreshold.toString()
-
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
-
defaultLanConfig
CreatesGossipConfigwith default settings for cluster on LAN network.- Returns:
- new
GossipConfig
-
defaultWanConfig
CreatesGossipConfigwith default settings for cluster on WAN network.- Returns:
- new
GossipConfig
-
defaultLocalConfig
CreatesGossipConfigwith default settings for cluster on local loopback interface.- Returns:
- new
GossipConfig
-
gossipFanout
Setter forgossipFanout.- Parameters:
gossipFanout- gossip fanout- Returns:
- new
GossipConfig
-
gossipFanout
public int gossipFanout() -
gossipInterval
Setter forgossipInterval.- Parameters:
gossipInterval- gossip interval- Returns:
- new
GossipConfig
-
gossipInterval
public long gossipInterval() -
gossipRepeatMult
Setter forgossipRepeatMult.- Parameters:
gossipRepeatMult- gossip repeat multiplier- Returns:
- new
GossipConfig
-
gossipRepeatMult
public int gossipRepeatMult() -
gossipSegmentationThreshold
Setter forgossipSegmentationThreshold.- 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
-
toString
-