Package com.atlassian.bamboo.plan
Class PlanExecutionLaunchControlImpl
- java.lang.Object
-
- com.atlassian.bamboo.plan.PlanExecutionLaunchControlImpl
-
- All Implemented Interfaces:
PlanExecutionLaunchControl
public class PlanExecutionLaunchControlImpl extends Object implements PlanExecutionLaunchControl
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
PlanExecutionLaunchControlImpl.ExecutionRequestEntry
protected static class
PlanExecutionLaunchControlImpl.PerRepositoryQueues
protected static class
PlanExecutionLaunchControlImpl.PerTriggerableMemory
-
Nested classes/interfaces inherited from interface com.atlassian.bamboo.plan.PlanExecutionLaunchControl
PlanExecutionLaunchControl.ReleaseLocksActions
-
-
Field Summary
-
Fields inherited from interface com.atlassian.bamboo.plan.PlanExecutionLaunchControl
NO_OP_RELEASE_LOCKS_ACTION
-
-
Constructor Summary
Constructors Constructor Description PlanExecutionLaunchControlImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Clears the whole internal state of the launch control object by removing the tracking of currently acquired locks.protected PlanExecutionLaunchControl.ReleaseLocksActions
createReleaseLocksObject(@NotNull Set<Long> lockedRepositoriesIds)
protected void
releaseLock(@NotNull Long repositoryId)
void
schedule(@NotNull TriggerableInternalKey triggerableInternalKey, @Nullable BuildDetectionAction buildDetectionAction, @NotNull Consumer<PlanExecutionLaunchControl.ReleaseLocksActions> runnableBody)
Scheduling theTriggerableInternalKey
to execute.protected boolean
shouldBeRunImmediately(@Nullable BuildDetectionAction buildDetectionAction)
-
-
-
Method Detail
-
schedule
public void schedule(@NotNull @NotNull TriggerableInternalKey triggerableInternalKey, @Nullable @Nullable BuildDetectionAction buildDetectionAction, @NotNull @NotNull Consumer<PlanExecutionLaunchControl.ReleaseLocksActions> runnableBody)
Description copied from interface:PlanExecutionLaunchControl
Scheduling theTriggerableInternalKey
to execute. The launch control will execute the request once it is the most effective. All scheduled actions will be eventually executed.- Specified by:
schedule
in interfacePlanExecutionLaunchControl
- Parameters:
triggerableInternalKey
- key of the triggerable that asked for executionbuildDetectionAction
- action in which context the execution will be maderunnableBody
- the side effect that will be executed once the launch control decides it is the best time to do so
-
clear
public void clear()
Description copied from interface:PlanExecutionLaunchControl
Clears the whole internal state of the launch control object by removing the tracking of currently acquired locks.- Specified by:
clear
in interfacePlanExecutionLaunchControl
-
releaseLock
protected void releaseLock(@NotNull @NotNull Long repositoryId)
-
shouldBeRunImmediately
protected boolean shouldBeRunImmediately(@Nullable @Nullable BuildDetectionAction buildDetectionAction)
-
createReleaseLocksObject
protected PlanExecutionLaunchControl.ReleaseLocksActions createReleaseLocksObject(@NotNull @NotNull Set<Long> lockedRepositoriesIds)
-
-