com.atlassian.bamboo.plan
Interface NonBlockingPlanExecutionService

All Known Implementing Classes:
NonBlockingPlanExecutionServiceImpl

public interface NonBlockingPlanExecutionService

An alternative to PlanExecutionManager that will run the change detection in the background.

Since:
v4.0

Method Summary
 void enqueueTrigger(Triggerable triggerable, java.lang.Long triggerId, BuildDetectionAction buildDetectionAction)
          Submits a background task to run PlanExecutionManager.start(com.atlassian.bamboo.plan.cache.ImmutableChain, com.atlassian.bamboo.build.BuildDetectionAction, com.atlassian.bamboo.util.AcquisitionPolicy).
 ExecutorStats getExecutorStats()
          Stats for the underlying ThreadPoolExecutor
 java.util.concurrent.Future<ExecutionRequestResult> tryToStart(Triggerable triggerable, BuildDetectionAction buildDetectionAction)
          Submits a background task to run PlanExecutionManager.start(com.atlassian.bamboo.plan.cache.ImmutableChain, com.atlassian.bamboo.build.BuildDetectionAction, com.atlassian.bamboo.util.AcquisitionPolicy).
 

Method Detail

tryToStart

@Nullable
java.util.concurrent.Future<ExecutionRequestResult> tryToStart(@NotNull
                                                                        Triggerable triggerable,
                                                                        @NotNull
                                                                        BuildDetectionAction buildDetectionAction)
Submits a background task to run PlanExecutionManager.start(com.atlassian.bamboo.plan.cache.ImmutableChain, com.atlassian.bamboo.build.BuildDetectionAction, com.atlassian.bamboo.util.AcquisitionPolicy). The task uses AcquisitionPolicy.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
                    Triggerable triggerable,
                    @NotNull
                    java.lang.Long triggerId,
                    @NotNull
                    BuildDetectionAction buildDetectionAction)
Submits a background task to run PlanExecutionManager.start(com.atlassian.bamboo.plan.cache.ImmutableChain, com.atlassian.bamboo.build.BuildDetectionAction, com.atlassian.bamboo.util.AcquisitionPolicy). Only one AcquisitionPolicy.IMMEDIATE per planKey + triggerId combination will be queued at any point in time. The task are not guaranteed to be run, they might get dropped if tryToStart(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
ExecutorStats getExecutorStats()
Stats for the underlying ThreadPoolExecutor

Returns:


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.