Package io.atomix.protocols.gossip
Class AntiEntropyProtocolConfig
java.lang.Object
io.atomix.primitive.protocol.PrimitiveProtocolConfig<AntiEntropyProtocolConfig>
io.atomix.protocols.gossip.AntiEntropyProtocolConfig
- All Implemented Interfaces:
io.atomix.utils.config.Config,io.atomix.utils.config.TypedConfig<io.atomix.primitive.protocol.PrimitiveProtocol.Type>
@Beta public class AntiEntropyProtocolConfig extends io.atomix.primitive.protocol.PrimitiveProtocolConfig<AntiEntropyProtocolConfig>
Anti-entropy protocol configuration.
-
Constructor Summary
Constructors Constructor Description AntiEntropyProtocolConfig() -
Method Summary
Modifier and Type Method Description java.time.DurationgetAntiEntropyInterval()Returns the anti-entropy advertisement interval.java.time.DurationgetGossipInterval()Returns the gossip interval.Set<String>getPeers()Returns the set of peers with which to gossip.PeerSelectorgetPeerSelector()Returns the gossip peer selector.TimestampProvidergetTimestampProvider()Returns the configured timestamp provider.io.atomix.primitive.protocol.PrimitiveProtocol.TypegetType()booleanisTombstonesDisabled()Returns whether tombstones are enabled.AntiEntropyProtocolConfigsetAntiEntropyInterval(java.time.Duration antiEntropyInterval)Sets the anti-entropy advertisement interval.AntiEntropyProtocolConfigsetGossipInterval(java.time.Duration gossipInterval)Sets the gossip interval.AntiEntropyProtocolConfigsetPeers(Set<String> peers)Sets the set of peers with which to gossip.AntiEntropyProtocolConfigsetPeerSelector(PeerSelector peerSelector)Sets the gossip peer selector.AntiEntropyProtocolConfigsetPeerSelector(PeerSelectors peerSelector)Sets the gossip peer selector.AntiEntropyProtocolConfigsetTimestampProvider(TimestampProvider timestampProvider)Sets the timestamp provider.AntiEntropyProtocolConfigsetTimestampProvider(TimestampProviders timestampProvider)Sets the timestamp provider.AntiEntropyProtocolConfigsetTombstonesDisabled(boolean tombstonesDisabled)Sets whether tombstones are enabled.
-
Constructor Details
-
AntiEntropyProtocolConfig
public AntiEntropyProtocolConfig()
-
-
Method Details
-
getType
public io.atomix.primitive.protocol.PrimitiveProtocol.Type getType() -
getTimestampProvider
Returns the configured timestamp provider.- Returns:
- the configured timestamp provider
-
setTimestampProvider
Sets the timestamp provider.- Parameters:
timestampProvider- the timestamp provider- Returns:
- the anti-entropy protocol configuration
-
setTimestampProvider
Sets the timestamp provider.- Parameters:
timestampProvider- the timestamp provider- Returns:
- the anti-entropy protocol configuration
-
getPeers
Returns the set of peers with which to gossip.- Returns:
- the set of peers with which to gossip
-
setPeers
Sets the set of peers with which to gossip.- Parameters:
peers- the set of peers with which to gossip- Returns:
- the anti-entropy protocol configuration
-
getPeerSelector
Returns the gossip peer selector.- Returns:
- the gossip peer selector
-
setPeerSelector
Sets the gossip peer selector.- Parameters:
peerSelector- the gossip peer selector- Returns:
- the anti-entropy protocol configuration
-
setPeerSelector
Sets the gossip peer selector.- Parameters:
peerSelector- the gossip peer selector- Returns:
- the anti-entropy protocol configuration
-
isTombstonesDisabled
public boolean isTombstonesDisabled()Returns whether tombstones are enabled.- Returns:
- whether tombstones are enabled
-
setTombstonesDisabled
Sets whether tombstones are enabled.- Parameters:
tombstonesDisabled- whether tombstones are enabled- Returns:
- the anti-entropy protocol configuration
-
getGossipInterval
public java.time.Duration getGossipInterval()Returns the gossip interval.- Returns:
- the gossip interval
-
setGossipInterval
Sets the gossip interval.- Parameters:
gossipInterval- the gossip interval- Returns:
- the anti-entropy protocol configuration
-
getAntiEntropyInterval
public java.time.Duration getAntiEntropyInterval()Returns the anti-entropy advertisement interval.- Returns:
- the anti-entropy advertisement interval
-
setAntiEntropyInterval
Sets the anti-entropy advertisement interval.- Parameters:
antiEntropyInterval- the anti-entropy advertisement interval- Returns:
- the anti-entropy protocol configuration
-