Class PlanExecutionManagerImpl

  • All Implemented Interfaces:
    ExecutionStatusProvider, PlanExecutionManager

    public class PlanExecutionManagerImpl
    extends Object
    implements PlanExecutionManager
    We have 3 (yes, three) ways to handle BuildDetectionAction, it all depends which interface is implemented:
    1. UnconditionalBuildDetectionAction - meaning: if this action is created we know we want to start a build. (example: scheduled build, dependant build...)
    2. DelayedChangeDetectionAction - special case of 1) with added feature of calling thread not being blocked by change detection (manual builds, restarted builds...)
    3. ConditionalBuildDetectionAction - we don't know a priori if we want to start a build (trigger by vcs change)
    How do we handle each case (pseudocode):
    1.  inChangeDetectionLock
       {
       inBuildCountLock
       {
       checkIfCountNotExceeded
       createResultWithoutChanges
       }
       doChangeDetection
       }
       
    2.  inBuildCountLock
       {
       checkIfCountNotExceeded
       createResultWithoutChanges;
       inNewThread
       {
       inChangeDetectionLock
       {
       doChangeDetection
       }
       }
       }
       
    3.  inChangeDetectionLock
       {
       inBuildCountLock
       {
       checkIfCountNotExceeded
       }
       doChangeDetection
       inBuildCountLock
       {
       checkIfCountNotExceeded
       createResultWithChanges
       }
       }