T - the node typepublic static class PhiAccrualFailureDetectionService.Builder<T extends io.atomix.utils.Identifier> extends Object implements FailureDetectionService.Builder<T>
| Constructor and Description |
|---|
Builder() |
public PhiAccrualFailureDetectionService.Builder<T> withProtocol(FailureDetectionProtocol<T> protocol)
protocol - the failure detection protocolNullPointerException - if the protocol is nullpublic PhiAccrualFailureDetectionService.Builder<T> withLocalNode(T identifier)
identifier - the local identifierNullPointerException - if the identifier is nullpublic PhiAccrualFailureDetectionService.Builder<T> withPeerProvider(Supplier<Collection<T>> peerProvider)
peerProvider - the gossip peer providerNullPointerException - if the peer provider is nullpublic PhiAccrualFailureDetectionService.Builder<T> withHeartbeatExecutor(ScheduledExecutorService executor)
executor - the heartbeat executorNullPointerException - if the heartbeat executor is nullpublic PhiAccrualFailureDetectionService.Builder<T> withHeartbeatInterval(Duration interval)
interval - the heartbeat intervalNullPointerException - if the heartbeat interval is nullpublic PhiAccrualFailureDetectionService.Builder<T> withPhiFailureThreshold(int failureThreshold)
failureThreshold - the failure thresholdIllegalArgumentException - if the failure threshold is not positivepublic PhiAccrualFailureDetectionService.Builder<T> withMinSamples(int minSamples)
minSamples - the minimum number of samples required to compute phiIllegalArgumentException - if the minimum number of samples is not positivepublic PhiAccrualFailureDetectionService.Builder<T> withPhiFactor(double phiFactor)
phiFactor - the phi factorIllegalArgumentException - if the phi factor is not positivepublic FailureDetectionService<T> build()
build in interface io.atomix.utils.Builder<FailureDetectionService<T extends io.atomix.utils.Identifier>>Copyright © 2013–2017. All rights reserved.