Class StartupRecovery
java.lang.Object
io.jenkins.plugins.batchcontrol.ops.StartupRecovery
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public final class StartupRecovery
extends Object
Restart durability (SPEC item 4): after every startup, APPROVED requests that never
executed are re-submitted exactly once (idempotent via the consumption ticket and the
restored-queue/existing-build checks in the policy service).
Runs after InitMilestone.JOB_CONFIG_ADAPTED, the same initializer band in which
Jenkins core restores the queue (Queue.init); the policy service coordinates with
that restore under the queue lock so the recovery dedup always sees the restored queue
items (T-RT-17). after = COMPLETED would stall initialization (JENKINS-37759).
The completion flag is tracked per Jenkins session (weak reference to the instance, so
test harnesses that boot several Jenkins in one JVM reset it naturally); it gates
ExpiryPeriodicWork so pre-restart approvals are never expired before recovery has
re-based their timeout to the recovery moment (SPEC item 7 exception).
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanWhether recovery has completed for the currently running Jenkins instance.static voidrecover()
-
Method Details
-
recover
-
isCompletedForCurrentSession
public static boolean isCompletedForCurrentSession()Whether recovery has completed for the currently running Jenkins instance.
-