public interface ApplicationStore
Store for the application and test packages, diffs, and other metadata.
Author:
smorgrav, jonmv
  • Method Summary

    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 number
    byte[]
    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 number
    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
    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.
    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.
    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.
    void
    pruneDevDiffs(DeploymentId deploymentId, long beforeBuildNumber)
    Removes diffs for dev packages before the given build number
    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
    void
    Prunes metadata such that only what was active at the given instant, and anything newer, is retained.
    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.
    void
    putDev(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.
    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.
    void
    putMeta(DeploymentId id, Instant now, byte[] metaZip)
    Stores the given manual deployment metadata with the current time as part of the path.
    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.
    void
    Marks the given manual deployment as deleted, and eligible for metadata GC at a later time.
    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.
  • Method Details

    • get

      byte[] get(DeploymentId deploymentId, RevisionId revisionId)
      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

      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, 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.
    • 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

      void putMeta(DeploymentId id, Instant now, byte[] metaZip)
      Stores the given manual deployment metadata 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 metadata GC at a later time.
    • pruneMeta

      void pruneMeta(Instant oldest)
      Prunes metadata such that only what was active at the given instant, and anything newer, is retained.