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 classPlanExecutionLaunchControlImpl.ExecutionRequestEntryprotected static classPlanExecutionLaunchControlImpl.PerRepositoryQueuesprotected static classPlanExecutionLaunchControlImpl.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 voidclear()Clears the whole internal state of the launch control object by removing the tracking of currently acquired locks.protected PlanExecutionLaunchControl.ReleaseLocksActionscreateReleaseLocksObject(@NotNull Set<Long> lockedRepositoriesIds)protected voidreleaseLock(@NotNull Long repositoryId)voidschedule(@NotNull TriggerableInternalKey triggerableInternalKey, @Nullable BuildDetectionAction buildDetectionAction, @NotNull Consumer<PlanExecutionLaunchControl.ReleaseLocksActions> runnableBody)Scheduling theTriggerableInternalKeyto execute.protected booleanshouldBeRunImmediately(@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:PlanExecutionLaunchControlScheduling theTriggerableInternalKeyto execute. The launch control will execute the request once it is the most effective. All scheduled actions will be eventually executed.- Specified by:
schedulein 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:PlanExecutionLaunchControlClears the whole internal state of the launch control object by removing the tracking of currently acquired locks.- Specified by:
clearin 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)
-
-