Class SynapseArtifactDeploymentStore


  • public final class SynapseArtifactDeploymentStore
    extends Object
    Keeps track of the artifacts deployed with files inside the synapse repository

    For hot deployment to properly work we need to, keep track fo not only the artifacts deployed by deployers but also the artifacts deployed from files at the startup as well. Otherwise it is not possible to track the hot update cases. This is introduced as a singleton for the startup to report back for the deployed artifacts at startup apart from the deployers.

    See Also:
    AbstractSynapseArtifactDeployer, MultiXMLConfigurationBuilder
    • Constructor Detail

      • SynapseArtifactDeploymentStore

        public SynapseArtifactDeploymentStore()
    • Method Detail

      • addArtifact

        public void addArtifact​(String fileName,
                                String artifactName)
        Adds artifacts indexed with the respective filename
        Parameters:
        fileName - name of the file from which the artifact being added is loaded
        artifactName - name of the artifact being added
      • containsFileName

        public boolean containsFileName​(String fileName)
        Checks whether there is an artifact indexed with the given filename
        Parameters:
        fileName - artifact filename to be checked for the existence
        Returns:
        boolean true if it is available, false if not
      • getArtifactNameForFile

        public String getArtifactNameForFile​(String fileName)
        Retrieves the artifact name indexed with the given filename
        Parameters:
        fileName - name of the file which maps to the artifact
        Returns:
        String artifact name mapped with the give filename
      • removeArtifactWithFileName

        public void removeArtifactWithFileName​(String fileName)
        Removes the indexed artifacts to the filename mapping from the holder
        Parameters:
        fileName - name of the file of which the artifact required to be removed
      • addUpdatingArtifact

        public void addUpdatingArtifact​(String fileName,
                                        String artifactName)
        Adds an updating artifact for the given instance
        Parameters:
        fileName - name of the file from which the artifact has been loaded
        artifactName - name of the actual artifact being updated
      • isUpdatingArtifact

        public boolean isUpdatingArtifact​(String fileName)
        Checks whether the given artifact is at the updating state in the given instance
        Parameters:
        fileName - name of the file which describes the artifact to be checked
        Returns:
        boolean true if it is at the updating state, false otherwise
      • getUpdatingArtifactWithFileName

        public String getUpdatingArtifactWithFileName​(String fileName)
        Retrieves the artifact name corresponds to the given updating artifact file name
        Parameters:
        fileName - name of the file from which the artifact is being updated
        Returns:
        String artifact name corresponds to the given file name
      • removeUpdatingArtifact

        public void removeUpdatingArtifact​(String fileName)
        Removes an updating artifact
        Parameters:
        fileName - name of the file of the artifact to be removed from the updating artifacts
      • addRestoredArtifact

        public void addRestoredArtifact​(String fileName)
        Adds an artifact which is being restored
        Parameters:
        fileName - name of the file of the artifact which is being restored
      • isRestoredFile

        public boolean isRestoredFile​(String fileName)
        Checks whether the given artifact is being restored
        Parameters:
        fileName - name of the file to be checked
        Returns:
        boolean true if the provided filename describes a restoring artifact, false otherwise
      • removeRestoredFile

        public void removeRestoredFile​(String fileName)
        Removes a restored artifact
        Parameters:
        fileName - name of the file of the artifact to be removed
      • addBackedUpArtifact

        public void addBackedUpArtifact​(String fileName)
        Adds an artifact to the backedUp artifacts
        Parameters:
        fileName - name of the file of the artifact to be added into the backedUp artifacts
      • isBackedUpArtifact

        public boolean isBackedUpArtifact​(String fileName)
        Checks whether the given artifact is being backed up
        Parameters:
        fileName - name of the file of the artifact to be checked
        Returns:
        boolean true if the artifact is being backed up, false otherwise
      • removeBackedUpArtifact

        public void removeBackedUpArtifact​(String fileName)
        Removes a backedUp artifact
        Parameters:
        fileName - name of the file of the artifact to be removed
      • getNormalizedAbsolutePath

        public static String getNormalizedAbsolutePath​(String fileName)
      • getMainSeqLstUpdatedFile

        public String getMainSeqLstUpdatedFile()
      • setMainSeqLstUpdatedFile

        public void setMainSeqLstUpdatedFile​(String mainSeqLstUpdatedFile)
      • getFaultSeqLstUpdatedFile

        public String getFaultSeqLstUpdatedFile()
      • setFaultSeqLstUpdatedFile

        public void setFaultSeqLstUpdatedFile​(String faultSeqLstUpdatedFile)
      • addClassMediatorClassLoader

        public void addClassMediatorClassLoader​(String path,
                                                ClassLoader classLoader)
      • removeClassMediatorClassLoader

        public void removeClassMediatorClassLoader​(String path)