|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthudson.model.queue.QueueTaskDispatcher
com.sonyericsson.hudson.plugins.gerrit.trigger.dependency.DependencyQueueTaskDispatcher
@Extension public class DependencyQueueTaskDispatcher
Blocks builds from running until the projects on which they depend have finished building. This applies on a per-event basis, so for each event, the plugin will wait for dependency projects (i.e., projects on which it depends) which also trigger for the same event, to finish building before building a dependent project.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
---|
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson |
Constructor Summary | |
---|---|
DependencyQueueTaskDispatcher()
Default constructor. |
Method Summary | |
---|---|
void |
allBuildsCompleted(com.sonymobile.tools.gerrit.gerritevents.dto.GerritEvent event)
Called when all builds triggered by the event are completed. |
void |
buildCompleted(com.sonymobile.tools.gerrit.gerritevents.dto.GerritEvent event,
hudson.model.AbstractBuild build)
Called when a build is completed. |
void |
buildStarted(com.sonymobile.tools.gerrit.gerritevents.dto.GerritEvent event,
hudson.model.AbstractBuild build)
Called when a build has started. |
hudson.model.queue.CauseOfBlockage |
canRun(hudson.model.Queue.Item item)
|
void |
gerritEvent(com.sonymobile.tools.gerrit.gerritevents.dto.GerritEvent event)
Process lifecycle events. |
protected List<hudson.model.AbstractProject> |
getBlockingDependencyProjects(List<hudson.model.AbstractProject> dependencies,
com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event)
Gets the subset of projects which have a building element needing to complete for the same event. |
static DependencyQueueTaskDispatcher |
getInstance()
Returns the registered instance of this class from the list of all listeners. |
static List<hudson.model.AbstractProject> |
getProjectsFromString(String projects,
hudson.model.Item context)
Return a list of Abstract Projects from their string names. |
void |
onDoneTriggeringAll(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event)
Signals this event is done retriggering all its projects. |
void |
onTriggeringAll(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event)
Signals this event started retriggering all its projects. |
void |
projectTriggered(com.sonymobile.tools.gerrit.gerritevents.dto.GerritEvent event,
hudson.model.AbstractProject project)
Called when the trigger of a project has decided to trigger on the event. |
void |
triggerScanDone(com.sonymobile.tools.gerrit.gerritevents.dto.GerritEvent event)
Called after all triggers has been enumerated. |
void |
triggerScanStarting(com.sonymobile.tools.gerrit.gerritevents.dto.GerritEvent event)
Called before any triggers are enumerated. |
Methods inherited from class hudson.model.queue.QueueTaskDispatcher |
---|
all, canTake, canTake |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DependencyQueueTaskDispatcher()
Method Detail |
---|
public static DependencyQueueTaskDispatcher getInstance()
public hudson.model.queue.CauseOfBlockage canRun(hudson.model.Queue.Item item)
canRun
in class hudson.model.queue.QueueTaskDispatcher
protected List<hudson.model.AbstractProject> getBlockingDependencyProjects(List<hudson.model.AbstractProject> dependencies, com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event)
dependencies
- The list of projects which need to be checkedevent
- The event should have also caused the blocking builds.
public static List<hudson.model.AbstractProject> getProjectsFromString(String projects, hudson.model.Item context)
projects
- The string containing the projects, comma-separated.context
- The context in which to read the string
public void onTriggeringAll(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event)
event
- the event triggeringpublic void onDoneTriggeringAll(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event)
event
- the event done triggeringpublic void gerritEvent(com.sonymobile.tools.gerrit.gerritevents.dto.GerritEvent event)
gerritEvent
in interface com.sonymobile.tools.gerrit.gerritevents.GerritEventListener
event
- the event to which we subscribe.public void triggerScanStarting(com.sonymobile.tools.gerrit.gerritevents.dto.GerritEvent event)
GerritEventLifecycleListener
triggerScanStarting
in interface GerritEventLifecycleListener
event
- the event.public void triggerScanDone(com.sonymobile.tools.gerrit.gerritevents.dto.GerritEvent event)
GerritEventLifecycleListener
triggerScanDone
in interface GerritEventLifecycleListener
event
- the event.public void projectTriggered(com.sonymobile.tools.gerrit.gerritevents.dto.GerritEvent event, hudson.model.AbstractProject project)
GerritEventLifecycleListener
projectTriggered
in interface GerritEventLifecycleListener
event
- the event.project
- the project that was triggered.public void buildStarted(com.sonymobile.tools.gerrit.gerritevents.dto.GerritEvent event, hudson.model.AbstractBuild build)
GerritEventLifecycleListener
buildStarted
in interface GerritEventLifecycleListener
event
- the event.build
- the build.public void buildCompleted(com.sonymobile.tools.gerrit.gerritevents.dto.GerritEvent event, hudson.model.AbstractBuild build)
GerritEventLifecycleListener
buildCompleted
in interface GerritEventLifecycleListener
event
- the event.build
- the build.public void allBuildsCompleted(com.sonymobile.tools.gerrit.gerritevents.dto.GerritEvent event)
GerritEventLifecycleListener
allBuildsCompleted
in interface GerritEventLifecycleListener
event
- the event.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |