1 package org.apache.continuum.buildagent.taskqueue.manager;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import java.util.List;
23
24 import org.apache.continuum.buildagent.taskqueue.PrepareBuildProjectsTask;
25 import org.apache.continuum.taskqueue.BuildProjectTask;
26 import org.apache.continuum.taskqueue.manager.TaskQueueManagerException;
27 import org.codehaus.plexus.taskqueue.TaskQueue;
28
29 public interface BuildAgentTaskQueueManager
30 {
31 String ROLE = BuildAgentTaskQueueManager.class.getName();
32
33 TaskQueue getBuildQueue();
34
35 TaskQueue getPrepareBuildQueue();
36
37 void cancelBuild()
38 throws TaskQueueManagerException;
39
40 int getIdOfProjectCurrentlyBuilding()
41 throws TaskQueueManagerException;
42
43 BuildProjectTask getCurrentProjectInBuilding()
44 throws TaskQueueManagerException;
45
46 PrepareBuildProjectsTask getCurrentProjectInPrepareBuild()
47 throws TaskQueueManagerException;
48
49 boolean hasBuildTaskInQueue()
50 throws TaskQueueManagerException;
51
52 boolean isProjectInBuildQueue( int projectId )
53 throws TaskQueueManagerException;
54
55 boolean isInPrepareBuildQueue( int projectGroupId, int trigger, String scmRootAddress )
56 throws TaskQueueManagerException;
57
58 List<PrepareBuildProjectsTask> getProjectsInPrepareBuildQueue()
59 throws TaskQueueManagerException;
60
61 List<BuildProjectTask> getProjectsInBuildQueue()
62 throws TaskQueueManagerException;
63
64 boolean removeFromPrepareBuildQueue( int projectGroupId, int scmRootId )
65 throws TaskQueueManagerException;
66
67 void removeFromPrepareBuildQueue( int[] hashCodes )
68 throws TaskQueueManagerException;
69
70 boolean removeFromBuildQueue( int projectId, int buildDefinitionId )
71 throws TaskQueueManagerException;
72
73 void removeFromBuildQueue( int[] hashCodes )
74 throws TaskQueueManagerException;
75 }