Ferricstore.Flow.ClaimDueAPI (ferricstore v0.4.3)

Copy Markdown View Source

Public Flow claim path.

This module validates FLOW.CLAIM_DUE / reclaim options, chooses the hot due index keys, coordinates blocking waiters, and delegates the actual mutation to the shard/Raft path. Returned payload/value hydration is capped and explicit.

Performance boundary

Claiming is a primary hot path. Avoid new maps/lists in per-candidate loops, behaviours/protocol dispatch, or extra GenServer calls. Any structural change here should be benchmarked with queued DBOS-style workers and focused claim_due tests.

Summary

Functions

blocking_result(ctx, type, opts, block_ms)

claim_due(ctx, type, opts)

normal_attrs(attrs, state, limit)

normal_state_filter(states)

reclaim(ctx, type, opts)

result(ctx, type, opts)

result(ctx, type, opts, cold_due_mode)

return_records(ctx, records, payload_return, atom, named_values)

schedule_next_due(ctx, type, opts)

wait_keys(type, opts)

wait_registration(type, opts)