Interface ApplicationStore
-
public interface ApplicationStoreStore for the application and tester packages. This will replace ArtifactRepository for tenant applications.- Author:
- smorgrav, jonmv
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Optional<byte[]>find(com.yahoo.config.provision.TenantName tenant, com.yahoo.config.provision.ApplicationName application, long buildNumber)Find prod application package by given build numberbyte[]get(DeploymentId deploymentId, ApplicationVersion applicationVersion)Returns the tenant application package of the given version.Optional<byte[]>getDevDiff(DeploymentId deploymentId, long buildNumber)Returns the application package diff, compared to the previous build, for the given deployment and build numberOptional<byte[]>getDiff(com.yahoo.config.provision.TenantName tenantName, com.yahoo.config.provision.ApplicationName applicationName, long buildNumber)Returns the application package diff, compared to the previous build, for the given tenant, application and build numberbyte[]getTester(com.yahoo.config.provision.TenantName tenant, com.yahoo.config.provision.ApplicationName application, ApplicationVersion applicationVersion)Returns the tester application package of the given version.default booleanhasBuild(com.yahoo.config.provision.TenantName tenant, com.yahoo.config.provision.ApplicationName application, long buildNumber)Whether the prod application package with the given number is stored.booleanprune(com.yahoo.config.provision.TenantName tenant, com.yahoo.config.provision.ApplicationName application, ApplicationVersion olderThanVersion)Removes applications older than the given version, for the given application, and returns whether something was removed.voidpruneDevDiffs(DeploymentId deploymentId, long beforeBuildNumber)Removes diffs for dev packages before the given build numbervoidpruneDiffs(com.yahoo.config.provision.TenantName tenantName, com.yahoo.config.provision.ApplicationName applicationName, long beforeBuildNumber)Removes diffs for packages before the given build numbervoidpruneMeta(Instant oldest)Prunes meta data such that only what was active at the given instant, and anything newer, is retained.booleanpruneTesters(com.yahoo.config.provision.TenantName tenant, com.yahoo.config.provision.ApplicationName application, ApplicationVersion olderThanVersion)Removes tester packages older than the given version, for the given tester, and returns whether something was removed.voidput(com.yahoo.config.provision.TenantName tenant, com.yahoo.config.provision.ApplicationName application, ApplicationVersion applicationVersion, byte[] applicationPackage, byte[] diff)Stores the given tenant application package of the given version and diff since previous version.voidputDev(DeploymentId deploymentId, ApplicationVersion version, byte[] applicationPackage, byte[] diff)Stores the given application package as the development package for the given deployment and version and diff since previous version.voidputMeta(com.yahoo.config.provision.TenantName tenant, com.yahoo.config.provision.ApplicationName application, Instant now, byte[] metaZip)Stores the given application meta data with the current time as part of the path.voidputMeta(DeploymentId id, Instant now, byte[] metaZip)Stores the given manual deployment meta data with the current time as part of the path.voidputMetaTombstone(com.yahoo.config.provision.TenantName tenant, com.yahoo.config.provision.ApplicationName application, Instant now)Marks the given application as deleted, and eligible for meta data GC at a later time.voidputMetaTombstone(DeploymentId id, Instant now)Marks the given manual deployment as deleted, and eligible for meta data GC at a later time.voidputTester(com.yahoo.config.provision.TenantName tenant, com.yahoo.config.provision.ApplicationName application, ApplicationVersion applicationVersion, byte[] testerPackage)Stores the given tester application package of the given version.voidremoveAll(com.yahoo.config.provision.TenantName tenant, com.yahoo.config.provision.ApplicationName application)Removes all application packages for the given application, including any development package.voidremoveAllTesters(com.yahoo.config.provision.TenantName tenant, com.yahoo.config.provision.ApplicationName application)Removes all tester packages for the given tester.
-
-
-
Method Detail
-
get
byte[] get(DeploymentId deploymentId, ApplicationVersion applicationVersion)
Returns the tenant application package of the given version.
-
getDiff
Optional<byte[]> getDiff(com.yahoo.config.provision.TenantName tenantName, com.yahoo.config.provision.ApplicationName applicationName, long buildNumber)
Returns the application package diff, compared to the previous build, for the given tenant, application and build number
-
pruneDiffs
void pruneDiffs(com.yahoo.config.provision.TenantName tenantName, com.yahoo.config.provision.ApplicationName applicationName, long beforeBuildNumber)Removes diffs for packages before the given build number
-
find
Optional<byte[]> find(com.yahoo.config.provision.TenantName tenant, com.yahoo.config.provision.ApplicationName application, long buildNumber)
Find prod application package by given build number
-
hasBuild
default boolean hasBuild(com.yahoo.config.provision.TenantName tenant, com.yahoo.config.provision.ApplicationName application, long buildNumber)Whether the prod application package with the given number is stored.
-
put
void put(com.yahoo.config.provision.TenantName tenant, com.yahoo.config.provision.ApplicationName application, ApplicationVersion applicationVersion, byte[] applicationPackage, byte[] diff)Stores the given tenant application package of the given version and diff since previous version.
-
prune
boolean prune(com.yahoo.config.provision.TenantName tenant, com.yahoo.config.provision.ApplicationName application, ApplicationVersion olderThanVersion)Removes applications older than the given version, for the given application, and returns whether something was removed.
-
removeAll
void removeAll(com.yahoo.config.provision.TenantName tenant, com.yahoo.config.provision.ApplicationName application)Removes all application packages for the given application, including any development package.
-
getTester
byte[] getTester(com.yahoo.config.provision.TenantName tenant, com.yahoo.config.provision.ApplicationName application, ApplicationVersion applicationVersion)Returns the tester application package of the given version. Does NOT contain the services.xml.
-
putTester
void putTester(com.yahoo.config.provision.TenantName tenant, com.yahoo.config.provision.ApplicationName application, ApplicationVersion applicationVersion, byte[] testerPackage)Stores the given tester application package of the given version. Does NOT contain the services.xml.
-
pruneTesters
boolean pruneTesters(com.yahoo.config.provision.TenantName tenant, com.yahoo.config.provision.ApplicationName application, ApplicationVersion olderThanVersion)Removes tester packages older than the given version, for the given tester, and returns whether something was removed.
-
removeAllTesters
void removeAllTesters(com.yahoo.config.provision.TenantName tenant, com.yahoo.config.provision.ApplicationName application)Removes all tester packages for the given tester.
-
getDevDiff
Optional<byte[]> getDevDiff(DeploymentId deploymentId, long buildNumber)
Returns the application package diff, compared to the previous build, for the given deployment and build number
-
pruneDevDiffs
void pruneDevDiffs(DeploymentId deploymentId, long beforeBuildNumber)
Removes diffs for dev packages before the given build number
-
putDev
void putDev(DeploymentId deploymentId, ApplicationVersion version, byte[] applicationPackage, byte[] diff)
Stores the given application package as the development package for the given deployment and version and diff since previous version.
-
putMeta
void putMeta(com.yahoo.config.provision.TenantName tenant, com.yahoo.config.provision.ApplicationName application, Instant now, byte[] metaZip)Stores the given application meta data with the current time as part of the path.
-
putMetaTombstone
void putMetaTombstone(com.yahoo.config.provision.TenantName tenant, com.yahoo.config.provision.ApplicationName application, Instant now)Marks the given application as deleted, and eligible for meta data GC at a later time.
-
putMeta
void putMeta(DeploymentId id, Instant now, byte[] metaZip)
Stores the given manual deployment meta data with the current time as part of the path.
-
putMetaTombstone
void putMetaTombstone(DeploymentId id, Instant now)
Marks the given manual deployment as deleted, and eligible for meta data GC at a later time.
-
pruneMeta
void pruneMeta(Instant oldest)
Prunes meta data such that only what was active at the given instant, and anything newer, is retained.
-
-