Interface ApplicationStore
public interface ApplicationStore
Store for the application and test packages, diffs, and other metadata.
- Author:
- smorgrav, jonmv
-
Method Summary
Modifier and TypeMethodDescriptionOptional<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, RevisionId revisionId) Returns the application package of the given revision.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, RevisionId revision) Returns the tester application package of the given revision.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.voidprune(com.yahoo.config.provision.TenantName tenant, com.yahoo.config.provision.ApplicationName application, RevisionId revision) Removes application and test packages older than the given revision, for the given application.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 numbervoidPrunes metadata such that only what was active at the given instant, and anything newer, is retained.voidput(com.yahoo.config.provision.TenantName tenant, com.yahoo.config.provision.ApplicationName application, RevisionId revision, byte[] applicationPackage, byte[] testPackage, byte[] diff) Stores the given tenant application and test packages of the given revision, and diff since previous version.voidputDev(DeploymentId deploymentId, RevisionId revision, byte[] applicationPackage, byte[] diff) Stores the given application package as the development package for the given deployment and revision 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 metadata with the current time as part of the path.voidputMeta(DeploymentId id, Instant now, byte[] metaZip) Stores the given manual deployment metadata 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 metadata GC at a later time.voidputMetaTombstone(DeploymentId id, Instant now) Marks the given manual deployment as deleted, and eligible for metadata GC at a later time.voidremoveAll(com.yahoo.config.provision.TenantName tenant, com.yahoo.config.provision.ApplicationName application) Removes all application and test packages for the given application, including any development package.
-
Method Details
-
get
Returns the application package of the given revision. -
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, RevisionId revision, byte[] applicationPackage, byte[] testPackage, byte[] diff) Stores the given tenant application and test packages of the given revision, and diff since previous version. -
prune
void prune(com.yahoo.config.provision.TenantName tenant, com.yahoo.config.provision.ApplicationName application, RevisionId revision) Removes application and test packages older than the given revision, for the given application. -
removeAll
void removeAll(com.yahoo.config.provision.TenantName tenant, com.yahoo.config.provision.ApplicationName application) Removes all application and test packages for the given application, including any development package. -
getTester
byte[] getTester(com.yahoo.config.provision.TenantName tenant, com.yahoo.config.provision.ApplicationName application, RevisionId revision) Returns the tester application package of the given revision. Does NOT contain the services.xml. -
getDevDiff
Returns the application package diff, compared to the previous build, for the given deployment and build number -
pruneDevDiffs
Removes diffs for dev packages before the given build number -
putDev
Stores the given application package as the development package for the given deployment and revision 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 metadata 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 metadata GC at a later time. -
putMeta
Stores the given manual deployment metadata with the current time as part of the path. -
putMetaTombstone
Marks the given manual deployment as deleted, and eligible for metadata GC at a later time. -
pruneMeta
Prunes metadata such that only what was active at the given instant, and anything newer, is retained.
-