Package io.atomix.protocols.gossip
Class AntiEntropyProtocolBuilder
java.lang.Object
io.atomix.primitive.protocol.PrimitiveProtocolBuilder<AntiEntropyProtocolBuilder,AntiEntropyProtocolConfig,AntiEntropyProtocol>
io.atomix.protocols.gossip.AntiEntropyProtocolBuilder
- All Implemented Interfaces:
io.atomix.utils.Builder<AntiEntropyProtocol>
@Beta public class AntiEntropyProtocolBuilder extends io.atomix.primitive.protocol.PrimitiveProtocolBuilder<AntiEntropyProtocolBuilder,AntiEntropyProtocolConfig,AntiEntropyProtocol>
Anti-entropy protocol builder.
-
Constructor Summary
Constructors Constructor Description AntiEntropyProtocolBuilder(AntiEntropyProtocolConfig config) -
Method Summary
Modifier and Type Method Description AntiEntropyProtocolbuild()AntiEntropyProtocolBuilderwithAntiEntropyInterval(java.time.Duration antiEntropyInterval)Sets the anti-entropy advertisement interval.AntiEntropyProtocolBuilderwithGossipInterval(java.time.Duration gossipInterval)Sets the gossip interval.AntiEntropyProtocolBuilderwithPeers(Set<String> peers)Sets the set of peers with which to gossip.<E> AntiEntropyProtocolBuilderwithPeerSelector(PeerSelector<E> peerSelector)Sets the gossip peer selector.<E> AntiEntropyProtocolBuilderwithTimestampProvider(TimestampProvider<E> timestampProvider)Sets the timestamp provider.AntiEntropyProtocolBuilderwithTombstonesDisabled(boolean tombstonesDisabled)Sets whether tombstones are enabled.
-
Constructor Details
-
Method Details
-
withTimestampProvider
public <E> AntiEntropyProtocolBuilder withTimestampProvider(TimestampProvider<E> timestampProvider)Sets the timestamp provider.- Parameters:
timestampProvider- the timestamp provider- Returns:
- the anti-entropy protocol configuration
-
withPeers
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
-
withPeerSelector
Sets the gossip peer selector.- Parameters:
peerSelector- the gossip peer selector- Returns:
- the anti-entropy protocol configuration
-
withTombstonesDisabled
Sets whether tombstones are enabled.- Parameters:
tombstonesDisabled- whether tombstones are enabled- Returns:
- the anti-entropy protocol configuration
-
withGossipInterval
Sets the gossip interval.- Parameters:
gossipInterval- the gossip interval- Returns:
- the anti-entropy protocol configuration
-
withAntiEntropyInterval
Sets the anti-entropy advertisement interval.- Parameters:
antiEntropyInterval- the anti-entropy advertisement interval- Returns:
- the anti-entropy protocol configuration
-
build
-