summaryrefslogtreecommitdiffstats
path: root/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/ApplicationStore.java
blob: 4aae1daee2d8020a1355b320b0983f59ac450f77 (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
// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.controller.api.integration.deployment;

import com.yahoo.config.provision.ApplicationId;
/**
 * Store for the application package and application tester package.
 *
 * This interface will take over most of the responsibility from the ArtifactRepository with time.
 */
public interface ApplicationStore {

    /** Returns the tenant application package of the given version. */
    byte[] getApplicationPackage(ApplicationId application, ApplicationVersion applicationVersion);

    /** Stores the given tenant application package of the given version. */
    void putApplicationPackage(ApplicationId application, ApplicationVersion applicationVersion, byte[] applicationPackage);

    /** Removes applications older than the given version, for the given application, and returns whether something was removed. */
    boolean pruneApplicationPackages(ApplicationId application, ApplicationVersion olderThanVersion);

    /** Returns the tester application package of the given version. Does NOT contain the services.xml. */
    byte[] getTesterPackage(TesterId tester, ApplicationVersion applicationVersion);

    /** Stores the given tester application package of the given version. Does NOT contain the services.xml. */
    void putTesterPackage(TesterId tester, ApplicationVersion applicationVersion, byte[] testerPackage);

    /** Removes tester packages older than the given version, for the given tester, and returns whether something was removed. */
    boolean pruneTesterPackages(TesterId tester, ApplicationVersion olderThanVersion);

}