Class ApplicationMetaData


  • public class ApplicationMetaData
    extends java.lang.Object
    Metadata about an application package.
    Author:
    hmusum
    • Constructor Summary

      Constructors 
      Constructor Description
      ApplicationMetaData​(java.io.File appDir, java.lang.String deployedByUser, java.lang.String deployedFromDir, java.lang.Long deployTimestamp, boolean internalRedeploy, java.lang.String checksum, java.lang.Long generation, long previousActiveGeneration)  
      ApplicationMetaData​(java.lang.String deployedByUser, java.lang.String deployedFromDir, java.lang.Long deployTimestamp, boolean internalRedeploy, com.yahoo.config.provision.ApplicationId applicationId, java.lang.String checksum, java.lang.Long generation, long previousActiveGeneration)  
      ApplicationMetaData​(java.lang.String deployedByUser, java.lang.String deployedFromDir, java.lang.Long deployTimestamp, boolean internalRedeploy, java.lang.String applicationName, java.lang.String checksum, java.lang.Long generation, long previousActiveGeneration)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String asJsonString()  
      static ApplicationMetaData fromJsonString​(java.lang.String jsonString)  
      com.yahoo.config.provision.ApplicationId getApplicationId()  
      java.lang.String getApplicationName()
      Gets the name of the application (name of the directory from which application was deployed.
      java.lang.String getChecksum()
      Returns an md5 hash of the contents of the application package
      java.lang.String getCheckSum()
      Returns an md5 hash of the contents of the application package
      java.lang.String getDeployedByUser()
      Gets the user who deployed the application.
      java.lang.String getDeployPath()
      Gets the directory where the application was deployed from.
      java.lang.Long getDeployTimestamp()
      Gets the time the application was deployed Will return null if a problem occurred while getting metadata
      java.lang.Long getGeneration()
      Gets the time the application was deployed.
      long getPreviousActiveGeneration()
      Returns the previously active generation at the point when this application was created.
      com.yahoo.slime.Slime getSlime()  
      boolean isInternalRedeploy()
      Returns whether this application generation was produced by a system internal redeployment, not an application package change
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ApplicationMetaData

        public ApplicationMetaData​(java.io.File appDir,
                                   java.lang.String deployedByUser,
                                   java.lang.String deployedFromDir,
                                   java.lang.Long deployTimestamp,
                                   boolean internalRedeploy,
                                   java.lang.String checksum,
                                   java.lang.Long generation,
                                   long previousActiveGeneration)
      • ApplicationMetaData

        public ApplicationMetaData​(java.lang.String deployedByUser,
                                   java.lang.String deployedFromDir,
                                   java.lang.Long deployTimestamp,
                                   boolean internalRedeploy,
                                   java.lang.String applicationName,
                                   java.lang.String checksum,
                                   java.lang.Long generation,
                                   long previousActiveGeneration)
      • ApplicationMetaData

        public ApplicationMetaData​(java.lang.String deployedByUser,
                                   java.lang.String deployedFromDir,
                                   java.lang.Long deployTimestamp,
                                   boolean internalRedeploy,
                                   com.yahoo.config.provision.ApplicationId applicationId,
                                   java.lang.String checksum,
                                   java.lang.Long generation,
                                   long previousActiveGeneration)
    • Method Detail

      • getApplicationName

        public java.lang.String getApplicationName()
        Gets the name of the application (name of the directory from which application was deployed. Will return null if a problem occurred while getting metadata
        Returns:
        application name
      • getDeployedByUser

        public java.lang.String getDeployedByUser()
        Gets the user who deployed the application. Will return null if a problem occurred while getting metadata
        Returns:
        user name for the user who ran "deploy-application"
      • getDeployPath

        public java.lang.String getDeployPath()
        Gets the directory where the application was deployed from. Will return null if a problem occurred while getting metadata
        Returns:
        path to raw deploy directory (for the original application)
      • getApplicationId

        public com.yahoo.config.provision.ApplicationId getApplicationId()
      • getDeployTimestamp

        public java.lang.Long getDeployTimestamp()
        Gets the time the application was deployed Will return null if a problem occurred while getting metadata
        Returns:
        timestamp for when "deploy-application" was run. In ms.
      • getGeneration

        public java.lang.Long getGeneration()
        Gets the time the application was deployed. Will return null if a problem occurred while getting metadata
        Returns:
        timestamp for when "deploy-application" was run. In ms.
      • isInternalRedeploy

        public boolean isInternalRedeploy()
        Returns whether this application generation was produced by a system internal redeployment, not an application package change
      • getCheckSum

        public java.lang.String getCheckSum()
        Returns an md5 hash of the contents of the application package
      • getChecksum

        public java.lang.String getChecksum()
        Returns an md5 hash of the contents of the application package
      • getPreviousActiveGeneration

        public long getPreviousActiveGeneration()
        Returns the previously active generation at the point when this application was created.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • fromJsonString

        public static ApplicationMetaData fromJsonString​(java.lang.String jsonString)
      • getSlime

        public com.yahoo.slime.Slime getSlime()
      • asJsonString

        public java.lang.String asJsonString()