Interface ApplicationStore


  • public interface ApplicationStore
    Store for the application and tester packages. This will replace ArtifactRepository for tenant applications.
    Author:
    smorgrav, jonmv
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.Optional<byte[]> find​(com.yahoo.config.provision.TenantName tenant, com.yahoo.config.provision.ApplicationName application, long buildNumber)
      Find application package by given build number
      byte[] get​(com.yahoo.config.provision.TenantName tenant, com.yahoo.config.provision.ApplicationName application, ApplicationVersion applicationVersion)
      Returns the tenant application package of the given version.
      byte[] getDev​(com.yahoo.config.provision.ApplicationId application, com.yahoo.config.provision.zone.ZoneId zone)
      Returns the development package for the given application and zone.
      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.
      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.
      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.
      void put​(com.yahoo.config.provision.TenantName tenant, com.yahoo.config.provision.ApplicationName application, ApplicationVersion applicationVersion, byte[] applicationPackage)
      Stores the given tenant application package of the given version.
      void putDev​(com.yahoo.config.provision.ApplicationId application, com.yahoo.config.provision.zone.ZoneId zone, byte[] applicationPackage)
      Stores the given application package as the development package for the given application and zone.
      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.
      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.
      void removeAllTesters​(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​(com.yahoo.config.provision.TenantName tenant,
                   com.yahoo.config.provision.ApplicationName application,
                   ApplicationVersion applicationVersion)
        Returns the tenant application package of the given version.
      • find

        java.util.Optional<byte[]> find​(com.yahoo.config.provision.TenantName tenant,
                                        com.yahoo.config.provision.ApplicationName application,
                                        long buildNumber)
        Find application package by given build number
      • put

        void put​(com.yahoo.config.provision.TenantName tenant,
                 com.yahoo.config.provision.ApplicationName application,
                 ApplicationVersion applicationVersion,
                 byte[] applicationPackage)
        Stores the given tenant application package of the given 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.
      • putDev

        void putDev​(com.yahoo.config.provision.ApplicationId application,
                    com.yahoo.config.provision.zone.ZoneId zone,
                    byte[] applicationPackage)
        Stores the given application package as the development package for the given application and zone.
      • getDev

        byte[] getDev​(com.yahoo.config.provision.ApplicationId application,
                      com.yahoo.config.provision.zone.ZoneId zone)
        Returns the development package for the given application and zone.