com.atlassian.bamboo.build
Class DefaultBuildChangeDetector
java.lang.Object
com.atlassian.bamboo.container.BambooTask
com.atlassian.bamboo.build.DefaultBuildChangeDetector
- All Implemented Interfaces:
- BuildChangeDetector, Runnable
public class DefaultBuildChangeDetector
- extends BambooTask
- implements BuildChangeDetector
A Deamon that detects when a build needs to be built.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultBuildChangeDetector
public DefaultBuildChangeDetector(BlockingQueue codeChangeQueue,
ErrorHandler errorHandler,
BuildManager buildManager)
- Create the deamon.
- Parameters:
codeChangeQueue
- The SEDA queue to pipe the change to.errorHandler
- Report errors back to the userbuildManager
-
run
public void run()
- Check for build changes every second. Each build has it's own polling period
- Specified by:
run
in interface Runnable
- Overrides:
run
in class BambooTask
doTask
protected void doTask()
- Check for build build strategies to determine if they should be built
- Specified by:
doTask
in class BambooTask
checkIfBuildNeedsBuilding
public void checkIfBuildNeedsBuilding(Build build)
- Use the given build's BuildStrategy to check if the build needs building or not. Build's that need
building are added to the build queue.
It ignores checking builds that are currently being built. It ignore build's who sourse code repository is
being manipulated by another thread (possibly checking out the code when it has first been added...)
- Specified by:
checkIfBuildNeedsBuilding
in interface BuildChangeDetector
- Parameters:
build
- The build we're checking
sourceNotAlreadyCheckedOut
public boolean sourceNotAlreadyCheckedOut(File sourceCodeDirectory)
setRunning
public void setRunning(boolean keepRunning)
Copyright © 2006 Atlassian Software Systems. All Rights Reserved.