ClaimStrategy

sealed interface ClaimStrategy

Selects how WarpNode claims the tasks it owns on the consistent-hash ring.

Ring is pure consistent-hash assignment: each peer executes the tasks that hash to it, relying on the Results ORMap to absorb the duplicate executions that arise when peers' ring views briefly disagree during membership churn. RingWithIntent adds a lightweight intent-register that catches those disagreement-window conflicts before the work runs.

Inheritors

Types

Link copied to clipboard
object Companion
Link copied to clipboard
data object Ring : ClaimStrategy

Pure consistent-hash assignment — no intent layer.

Link copied to clipboard
data class RingWithIntent(val settleWindow: Duration = DEFAULT_SETTLE_WINDOW) : ClaimStrategy

Consistent-hash assignment plus an intent-register. A believed-owner announces its claim (free — it piggybacks on existing delta gossip) and, when its ring changed within settleWindow or it already sees a competing claim, waits settleWindow and executes only if it is the lowest-PeerId live claimant. This shrinks the duplicate executions that arise while peers' ring views transiently disagree during membership churn; the Results board remains the final dedup backstop.