Skip to content
English

PhiAccrualOptionsBuilder

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),
)

new PhiAccrualOptionsBuilder(): PhiAccrualOptionsBuilder

PhiAccrualOptionsBuilder

OptionsBuilder.constructor

build(): Partial<T>

Defined in: src/util/OptionsBuilder.ts:51

Snapshot the set fields as an independent Partial<T> (own props only).

Partial<T>

OptionsBuilder.build


withAcceptableHeartbeatPauseMs(ms): this

Defined in: src/cluster/PhiAccrualOptions.ts:64

Grace period added to the most recent heartbeat before phi rises.

number

this


withDownThreshold(phi): this

Defined in: src/cluster/PhiAccrualOptions.ts:49

Phi value above which the peer is flagged down. Must exceed unreachableThreshold.

number

this


withHeartbeatIntervalMs(ms): this

Defined in: src/cluster/PhiAccrualOptions.ts:39

Intended heartbeat cadence — keeps interval compatible with FailureDetector.

number

this


withMaxSampleSize(n): this

Defined in: src/cluster/PhiAccrualOptions.ts:54

How many recent intervals to keep in the sliding window.

number

this


withMinStdDeviationMs(ms): this

Defined in: src/cluster/PhiAccrualOptions.ts:59

Minimum stddev floor — avoids over-eager flagging for very stable peers.

number

this


withUnreachableThreshold(phi): this

Defined in: src/cluster/PhiAccrualOptions.ts:44

Phi value above which the peer is flagged unreachable. Typical 8–12.

number

this


static create(): PhiAccrualOptionsBuilder

Defined in: src/cluster/PhiAccrualOptions.ts:34

Start a fresh builder. Equivalent to new PhiAccrualOptionsBuilder().

PhiAccrualOptionsBuilder