summaryrefslogtreecommitdiffstats
path: root/controller-api
diff options
context:
space:
mode:
authorjonmv <venstad@gmail.com>2022-04-10 12:03:39 +0200
committerjonmv <venstad@gmail.com>2022-04-11 13:42:25 +0200
commite64eb299b12e79c9d9cbc2c8129f8225291daf90 (patch)
treec3d83b1940e94be33abf3df81dc5e7cb19f53212 /controller-api
parent30f1c233e6fd26c89f3b4f194478b66cbf1152cb (diff)
Simplify ApplicationStore
Diffstat (limited to 'controller-api')
-rw-r--r--controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/ApplicationStore.java29
1 files changed, 10 insertions, 19 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/ApplicationStore.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/ApplicationStore.java
index a5938c3b6b5..1c697baa3f6 100644
--- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/ApplicationStore.java
+++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/ApplicationStore.java
@@ -35,27 +35,18 @@ public interface ApplicationStore {
return find(tenant, application, buildNumber).isPresent();
}
- /** Stores the given tenant application package of the given version and diff since previous version. */
- void put(TenantName tenant, ApplicationName application, ApplicationVersion applicationVersion, byte[] applicationPackage, byte[] diff);
+ /** Stores the given tenant application and test packages of the given revision, and diff since previous version. */
+ void put(TenantName tenant, ApplicationName application, ApplicationVersion applicationVersion, byte[] applicationPackage, byte[] testPackage, byte[] diff);
- /** Removes applications older than the given version, for the given application, and returns whether something was removed. */
- boolean prune(TenantName tenant, ApplicationName application, ApplicationVersion olderThanVersion);
+ /** Removes application and test packages older than the given version, for the given application. */
+ void prune(TenantName tenant, ApplicationName application, ApplicationVersion olderThanVersion);
- /** Removes all application packages for the given application, including any development package. */
+ /** Removes all application and test packages for the given application, including any development package. */
void removeAll(TenantName tenant, ApplicationName application);
/** Returns the tester application package of the given version. Does NOT contain the services.xml. */
byte[] getTester(TenantName tenant, ApplicationName application, ApplicationVersion applicationVersion);
- /** Stores the given tester application package of the given version. Does NOT contain the services.xml. */
- void putTester(TenantName tenant, ApplicationName application, ApplicationVersion applicationVersion, byte[] testerPackage);
-
- /** Removes tester packages older than the given version, for the given tester, and returns whether something was removed. */
- boolean pruneTesters(TenantName tenant, ApplicationName application, ApplicationVersion olderThanVersion);
-
- /** Removes all tester packages for the given tester. */
- void removeAllTesters(TenantName tenant, ApplicationName application);
-
/** Returns the application package diff, compared to the previous build, for the given deployment and build number */
Optional<byte[]> getDevDiff(DeploymentId deploymentId, long buildNumber);
@@ -65,19 +56,19 @@ public interface ApplicationStore {
/** Stores the given application package as the development package for the given deployment and version and diff since previous version. */
void putDev(DeploymentId deploymentId, ApplicationVersion version, byte[] applicationPackage, byte[] diff);
- /** Stores the given application meta data with the current time as part of the path. */
+ /** Stores the given application metadata with the current time as part of the path. */
void putMeta(TenantName tenant, ApplicationName application, Instant now, byte[] metaZip);
- /** Marks the given application as deleted, and eligible for meta data GC at a later time. */
+ /** Marks the given application as deleted, and eligible for metadata GC at a later time. */
void putMetaTombstone(TenantName tenant, ApplicationName application, Instant now);
- /** Stores the given manual deployment meta data with the current time as part of the path. */
+ /** Stores the given manual deployment metadata with the current time as part of the path. */
void putMeta(DeploymentId id, Instant now, byte[] metaZip);
- /** Marks the given manual deployment as deleted, and eligible for meta data GC at a later time. */
+ /** Marks the given manual deployment as deleted, and eligible for metadata GC at a later time. */
void putMetaTombstone(DeploymentId id, Instant now);
- /** Prunes meta data such that only what was active at the given instant, and anything newer, is retained. */
+ /** Prunes metadata such that only what was active at the given instant, and anything newer, is retained. */
void pruneMeta(Instant oldest);
}