Header menu logo TDesu.FSharp

SnapshotThrottle Type

Snapshot throttle — tracks message count and triggers save at threshold (thread-safe).

Constructors

Constructor Description

SnapshotThrottle(threshold)

Full Usage: SnapshotThrottle(threshold)

Parameters:
    threshold : int

Returns: SnapshotThrottle
threshold : int
Returns: SnapshotThrottle

Instance members

Instance member Description

this.Count

Full Usage: this.Count

Returns: int

Current count since last snapshot.

Returns: int

this.Record

Full Usage: this.Record

Returns: bool

Records a message. Returns true if threshold reached (caller should save snapshot).

Thread-safe: uses atomic increment. Under contention, may trigger slightly past threshold.

Returns: bool

this.Reset

Full Usage: this.Reset

Resets the counter.

Type something to start searching.