Package com.atlassian.bamboo.plan
Interface NonBlockingPlanExecutionService
-
- All Known Implementing Classes:
NonBlockingPlanExecutionServiceImpl
@PublicApi public interface NonBlockingPlanExecutionServiceAn alternative toPlanExecutionManagerthat will run the change detection in the background.- Since:
- v4.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidenqueueTrigger(@NotNull Triggerable triggerable, @NotNull Long triggerId, @NotNull BuildDetectionAction buildDetectionAction)@NotNull ExecutorStatsgetExecutorStats()Stats for the underlyingThreadPoolExecutor@NotNull QueueActivityStatsDtogetQueueActivityStatsAndRestoreToInitialState()Gets analytical data from queue activity tracker and bring its initial state - start data collecting from scratch.Future<Boolean>shutdown()Stop accepting any more trigger requests.@Nullable Future<ExecutionRequestResult>tryToStart(@NotNull Triggerable triggerable, @NotNull BuildDetectionAction buildDetectionAction)
-
-
-
Method Detail
-
tryToStart
@Nullable @Nullable Future<ExecutionRequestResult> tryToStart(@NotNull @NotNull Triggerable triggerable, @NotNull @NotNull BuildDetectionAction buildDetectionAction)
Submits a background task to runPlanExecutionManager.start(com.atlassian.bamboo.plan.cache.ImmutableChain, com.atlassian.bamboo.build.BuildDetectionAction, com.atlassian.bamboo.util.AcquisitionPolicy). The task usesAcquisitionPolicy.WAIT. To be used for triggers that are 'unconditional'. In other words, the method should be used for cases where build absolutely, positively needs to trigger (unless encountering internal error or hitting concurrent build limit)- Parameters:
triggerable-buildDetectionAction-- Returns:
-
enqueueTrigger
void enqueueTrigger(@NotNull @NotNull Triggerable triggerable, @NotNull @NotNull Long triggerId, @NotNull @NotNull BuildDetectionAction buildDetectionAction)Submits a background task to runPlanExecutionManager.start(com.atlassian.bamboo.plan.cache.ImmutableChain, com.atlassian.bamboo.build.BuildDetectionAction, com.atlassian.bamboo.util.AcquisitionPolicy). Only oneAcquisitionPolicy.IMMEDIATEper planKey + triggerId combination will be queued at any point in time. The task are not guaranteed to be run, they might get dropped iftryToStart(Triggerable, BuildDetectionAction)is called. Rationale is: conditional triggers won't start anyway if there's a 'guaranteed' build run.To be used with automatic triggers: any auto Trigger can have Trigger Conditions defined
- Parameters:
triggerable-buildDetectionAction-
-
getExecutorStats
@NotNull @NotNull ExecutorStats getExecutorStats()
Stats for the underlyingThreadPoolExecutor- Returns:
-
getQueueActivityStatsAndRestoreToInitialState
@Internal @NotNull @NotNull QueueActivityStatsDto getQueueActivityStatsAndRestoreToInitialState()
Gets analytical data from queue activity tracker and bring its initial state - start data collecting from scratch.- Returns:
- QueueActivityStatsDto with stat amounts
- Since:
- 8.2
-
-