setMaxAttempts

fun setMaxAttempts(maxAttempts: Int)

Update the per-segment retry cap (the configured policy's maxAttempts) at runtime. Takes effect on the next segment completion; 0 = unlimited. Held on the configured policy, so it persists across setAutoLoopEnabled toggles.

Parameters

maxAttempts

max attempts per segment before forced advance (>= 0)