aboutsummaryrefslogtreecommitdiffstats
path: root/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/BuildSystem.java
blob: 15b3ef7fb834a77f5e53414068d7f79833eb6e78 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.controller.deployment;

import com.yahoo.config.provision.ApplicationId;
import com.yahoo.vespa.hosted.controller.api.integration.BuildService.BuildJob;
import com.yahoo.vespa.hosted.controller.application.DeploymentJobs.JobType;

import java.util.List;

/**
 * @author jvenstad
 * @author mpolden
 */
public interface BuildSystem {

    /**
     * Add a job for the given application to the build system
     *
     * @param application the application owning the job
     * @param jobType the job type to be queued
     * @param first whether the job should be added to the front of the queue
     */
    void addJob(ApplicationId application, JobType jobType, boolean first);

    /** Remove and return a list of jobs which should be run now */
    List<BuildJob> takeJobsToRun();

    /** Get a list of all jobs currently waiting to run */
    List<BuildJob> jobs();
    
    /** Removes all queued jobs for the given application */
    void removeJobs(ApplicationId applicationId);

}