App-replica side of the per-node ReplayerService: reads the co-located queue live and asks the Replayer for history and gaps. The Aeron adapter only: every decision lives in ReplayerRecovery. ReplayerStreamReceiver.java and replayer/client/ReplayerStreamReceiver.hpp are its twins.
More...
|
| | ReplayerStreamReceiver (int clientId, SequencedHandler onSequenced, LeadershipHandler onLeadershipChanged, CaughtUpHandler onCaughtUp, Func< bool > queueFaults=null, Func< bool > controlFaults=null, Func< long, bool > replayFaults=null) |
| | A receiver, dropping a live queue frame whenever queueFaults answers true, a Replayer reply whenever controlFaults does, and a replay frame whenever replayFaults does.
|
| |
| void | OnSnapshotRound (Action< long, long > handler) |
| | Hands each SnapshotRound the Replayer sends to handler , with the round and its cut; none is delivered without one (doc/snapshot.md §10.8).
|
| |
| bool | SendSnapshotJoined (int sourceId, long round) |
| | Tells the Replayer this replica takes part in round . Best-effort: the offer may not land.
|
| |
| bool | SendSnapshotConfirmed (int sourceId, long round) |
| | Tells the Replayer this replica's file for round is durable under its name. Best-effort: the offer may not land.
|
| |
| void | RestoreFrom (SnapshotStore store, ISnapshotRestoreHandler handler) |
| | Restores the newest snapshot in store on Start, before anything is dispatched, once a replay shows the log holds its cut (doc/snapshot.md §7). Call before Start; RestoreFailure reports a snapshot that cannot be restored.
|
| |
| void | Start (Aeron aeron, int memberId, int groupId) |
| | Subscribes the queue of a group and the control stream, opens the request publication and the convergence counter, and requests the cold-start replay from the recording's start, or the snapshot to restore first.
|
| |
| int | Poll () |
| | One duty-cycle iteration: drain control, ride an attached replay image, and always drain and dispatch the queue — ReplayerRecovery's contiguity check, not the poll routing, decides what a queue frame is worth mid-walk.
|
| |
| void | Dispose () |
| | Closes every subscription, the publication and the counter. The Aeron client is the caller's.
|
| |
|
| const string | QueueConsumerChannel = FrameLayer.QueueChannel + "|tether=false" |
| | The queue as a consumer addresses it: untethered, so a slow app is dropped and heals via replay.
|
| |
|
| bool | IsCaughtUp [get] |
| | Whether this client is following the live tail; revoked on a queue gap or an eviction from the queue, re-established at the seam.
|
| |
| long | LastClusterSeqNo [get] |
| | Highest clusterSeqNo dispatched in order, 0 before the first. The frontier a consumer measures its own recovery progress by.
|
| |
| int | CurrentLeaderMemberId [get] |
| | memberId of the current leader per the last LeadershipChanged processed, or -1 until one is seen. A replica emits iff its own node is this leader.
|
| |
| string | RestoreFailure [get] |
| | Why the snapshot given to RestoreFrom cannot be restored, or null. Latched: recovery has stopped.
|
| |
App-replica side of the per-node ReplayerService: reads the co-located queue live and asks the Replayer for history and gaps. The Aeron adapter only: every decision lives in ReplayerRecovery. ReplayerStreamReceiver.java and replayer/client/ReplayerStreamReceiver.hpp are its twins.
Single-threaded: every method runs on the one duty-cycle thread.
◆ ReplayerStreamReceiver()
| Org.Limitless.Seqeron.Replayer.Client.ReplayerStreamReceiver.ReplayerStreamReceiver |
( |
int |
clientId, |
|
|
SequencedHandler |
onSequenced, |
|
|
LeadershipHandler |
onLeadershipChanged, |
|
|
CaughtUpHandler |
onCaughtUp, |
|
|
Func< bool > |
queueFaults = null, |
|
|
Func< bool > |
controlFaults = null, |
|
|
Func< long, bool > |
replayFaults = null |
|
) |
| |
|
inline |
A receiver, dropping a live queue frame whenever queueFaults answers true, a Replayer reply whenever controlFaults does, and a replay frame whenever replayFaults does.
- Parameters
-
| clientId | this replica's id on the node, its counters' client label; replicas sharing one share their counters' series |
| onSequenced | receives every in-order frame |
| onLeadershipChanged | receives each leadership change, or null to have it reach onSequenced |
| onCaughtUp | fires on every transition to caught-up, or null |
| queueFaults | test harnesses only: polled once per live queue frame, on the poll thread; null drops nothing |
| controlFaults | test harnesses only: polled once per Replaying or ReplayPending, on the poll thread; null drops nothing. A SnapshotRound is not a reply and is never dropped. |
| replayFaults | test harnesses only: polled once per replay frame with where it starts in the recording, on the poll thread; null drops nothing |
- Exceptions
-
| ArgumentNullException | if onSequenced is null |
◆ Dispose()
| void Org.Limitless.Seqeron.Replayer.Client.ReplayerStreamReceiver.Dispose |
( |
| ) |
|
|
inline |
Closes every subscription, the publication and the counter. The Aeron client is the caller's.
◆ OnSnapshotRound()
| void Org.Limitless.Seqeron.Replayer.Client.ReplayerStreamReceiver.OnSnapshotRound |
( |
Action< long, long > |
handler | ) |
|
|
inline |
Hands each SnapshotRound the Replayer sends to handler , with the round and its cut; none is delivered without one (doc/snapshot.md §10.8).
- Parameters
-
| handler | receives the round's number and its cut's clusterSeqNo |
◆ Poll()
| int Org.Limitless.Seqeron.Replayer.Client.ReplayerStreamReceiver.Poll |
( |
| ) |
|
|
inline |
One duty-cycle iteration: drain control, ride an attached replay image, and always drain and dispatch the queue — ReplayerRecovery's contiguity check, not the poll routing, decides what a queue frame is worth mid-walk.
- Returns
- fragments consumed and snapshot records restored
- Exceptions
-
| InvalidOperationException | once this node's recording does not hold what recovery asked of it |
◆ RestoreFrom()
Restores the newest snapshot in store on Start, before anything is dispatched, once a replay shows the log holds its cut (doc/snapshot.md §7). Call before Start; RestoreFailure reports a snapshot that cannot be restored.
- Parameters
-
| store | this instance's snapshot files |
| handler | takes the restored records |
◆ SendSnapshotConfirmed()
| bool Org.Limitless.Seqeron.Replayer.Client.ReplayerStreamReceiver.SendSnapshotConfirmed |
( |
int |
sourceId, |
|
|
long |
round |
|
) |
| |
|
inline |
Tells the Replayer this replica's file for round is durable under its name. Best-effort: the offer may not land.
- Parameters
-
| sourceId | the application's sourceId |
| round | the round's number |
- Returns
- whether it was placed
◆ SendSnapshotJoined()
| bool Org.Limitless.Seqeron.Replayer.Client.ReplayerStreamReceiver.SendSnapshotJoined |
( |
int |
sourceId, |
|
|
long |
round |
|
) |
| |
|
inline |
Tells the Replayer this replica takes part in round . Best-effort: the offer may not land.
- Parameters
-
| sourceId | the application's sourceId |
| round | the round's number |
- Returns
- whether it was placed
◆ Start()
| void Org.Limitless.Seqeron.Replayer.Client.ReplayerStreamReceiver.Start |
( |
Aeron |
aeron, |
|
|
int |
memberId, |
|
|
int |
groupId |
|
) |
| |
|
inline |
Subscribes the queue of a group and the control stream, opens the request publication and the convergence counter, and requests the cold-start replay from the recording's start, or the snapshot to restore first.
- Parameters
-
| aeron | client sharing the co-located node's media driver |
| memberId | this app's node, to label the counter |
| groupId | the group whose queue to read: a consumer names its own, a façade passes the one the Replayer resolved (spec R-6) |
◆ QueueConsumerChannel
| const string Org.Limitless.Seqeron.Replayer.Client.ReplayerStreamReceiver.QueueConsumerChannel = FrameLayer.QueueChannel + "|tether=false" |
|
static |
The queue as a consumer addresses it: untethered, so a slow app is dropped and heals via replay.
◆ CurrentLeaderMemberId
| int Org.Limitless.Seqeron.Replayer.Client.ReplayerStreamReceiver.CurrentLeaderMemberId |
|
get |
memberId of the current leader per the last LeadershipChanged processed, or -1 until one is seen. A replica emits iff its own node is this leader.
◆ IsCaughtUp
| bool Org.Limitless.Seqeron.Replayer.Client.ReplayerStreamReceiver.IsCaughtUp |
|
get |
Whether this client is following the live tail; revoked on a queue gap or an eviction from the queue, re-established at the seam.
◆ LastClusterSeqNo
| long Org.Limitless.Seqeron.Replayer.Client.ReplayerStreamReceiver.LastClusterSeqNo |
|
get |
Highest clusterSeqNo dispatched in order, 0 before the first. The frontier a consumer measures its own recovery progress by.
◆ RestoreFailure
| string Org.Limitless.Seqeron.Replayer.Client.ReplayerStreamReceiver.RestoreFailure |
|
get |
Why the snapshot given to RestoreFrom cannot be restored, or null. Latched: recovery has stopped.
The documentation for this class was generated from the following file: