PhiAccrualOptionsBuilder
Este conteúdo não está disponível em sua língua ainda.
Defined in: src/cluster/PhiAccrualOptions.ts:32
Fluent builder for PhiAccrualOptionsType. Unset fields fall
through to defaultPhiAccrualOptions in the constructor, so a
bare PhiAccrualOptions.create() yields the defaults.
new PhiAccrualFailureDetector( PhiAccrualOptions.create().withUnreachableThreshold(10).withDownThreshold(16),)Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new PhiAccrualOptionsBuilder():
PhiAccrualOptionsBuilder
Returns
Section titled “Returns”PhiAccrualOptionsBuilder
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”build()
Section titled “build()”build():
Partial<T>
Defined in: src/util/OptionsBuilder.ts:51
Snapshot the set fields as an independent Partial<T> (own props only).
Returns
Section titled “Returns”Partial<T>
Inherited from
Section titled “Inherited from”withAcceptableHeartbeatPauseMs()
Section titled “withAcceptableHeartbeatPauseMs()”withAcceptableHeartbeatPauseMs(
ms):this
Defined in: src/cluster/PhiAccrualOptions.ts:64
Grace period added to the most recent heartbeat before phi rises.
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”this
withDownThreshold()
Section titled “withDownThreshold()”withDownThreshold(
phi):this
Defined in: src/cluster/PhiAccrualOptions.ts:49
Phi value above which the peer is flagged down. Must exceed unreachableThreshold.
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”this
withHeartbeatIntervalMs()
Section titled “withHeartbeatIntervalMs()”withHeartbeatIntervalMs(
ms):this
Defined in: src/cluster/PhiAccrualOptions.ts:39
Intended heartbeat cadence — keeps interval compatible with FailureDetector.
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”this
withMaxSampleSize()
Section titled “withMaxSampleSize()”withMaxSampleSize(
n):this
Defined in: src/cluster/PhiAccrualOptions.ts:54
How many recent intervals to keep in the sliding window.
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”this
withMinStdDeviationMs()
Section titled “withMinStdDeviationMs()”withMinStdDeviationMs(
ms):this
Defined in: src/cluster/PhiAccrualOptions.ts:59
Minimum stddev floor — avoids over-eager flagging for very stable peers.
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”this
withUnreachableThreshold()
Section titled “withUnreachableThreshold()”withUnreachableThreshold(
phi):this
Defined in: src/cluster/PhiAccrualOptions.ts:44
Phi value above which the peer is flagged unreachable. Typical 8–12.
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”this
create()
Section titled “create()”
staticcreate():PhiAccrualOptionsBuilder
Defined in: src/cluster/PhiAccrualOptions.ts:34
Start a fresh builder. Equivalent to new PhiAccrualOptionsBuilder().
Returns
Section titled “Returns”PhiAccrualOptionsBuilder
