Package org.apache.synapse.deployers
Class SynapseArtifactDeploymentStore
- java.lang.Object
-
- org.apache.synapse.deployers.SynapseArtifactDeploymentStore
-
public final class SynapseArtifactDeploymentStore extends Object
Keeps track of the artifacts deployed with files inside the synapse repositoryFor 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.
-
-
Constructor Summary
Constructors Constructor Description SynapseArtifactDeploymentStore()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addArtifact(String fileName, String artifactName)
Adds artifacts indexed with the respective filenamevoid
addBackedUpArtifact(String fileName)
Adds an artifact to the backedUp artifactsvoid
addClassMediatorClassLoader(String path, ClassLoader classLoader)
void
addRestoredArtifact(String fileName)
Adds an artifact which is being restoredvoid
addUpdatingArtifact(String fileName, String artifactName)
Adds an updating artifact for the given instanceboolean
containsFileName(String fileName)
Checks whether there is an artifact indexed with the givenfilename
String
getArtifactNameForFile(String fileName)
Retrieves the artifact name indexed with the givenfilename
Map<String,ClassLoader>
getClassMediatorClassLoaders()
String
getFaultSeqLstUpdatedFile()
String
getMainSeqLstUpdatedFile()
static String
getNormalizedAbsolutePath(String fileName)
String
getUpdatingArtifactWithFileName(String fileName)
Retrieves the artifact name corresponds to the given updating artifact file nameboolean
isBackedUpArtifact(String fileName)
Checks whether the given artifact is being backed upboolean
isRestoredFile(String fileName)
Checks whether the given artifact is being restoredboolean
isUpdatingArtifact(String fileName)
Checks whether the given artifact is at the updating state in the given instancevoid
removeArtifactWithFileName(String fileName)
Removes the indexed artifacts to thefilename
mapping from the holdervoid
removeBackedUpArtifact(String fileName)
Removes a backedUp artifactvoid
removeClassMediatorClassLoader(String path)
void
removeRestoredFile(String fileName)
Removes a restored artifactvoid
removeUpdatingArtifact(String fileName)
Removes an updating artifactvoid
setFaultSeqLstUpdatedFile(String faultSeqLstUpdatedFile)
void
setMainSeqLstUpdatedFile(String mainSeqLstUpdatedFile)
-
-
-
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 loadedartifactName
- name of the artifact being added
-
containsFileName
public boolean containsFileName(String fileName)
Checks whether there is an artifact indexed with the givenfilename
- 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 givenfilename
- 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 thefilename
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 loadedartifactName
- 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
-
getMainSeqLstUpdatedFile
public String getMainSeqLstUpdatedFile()
-
setMainSeqLstUpdatedFile
public void setMainSeqLstUpdatedFile(String mainSeqLstUpdatedFile)
-
getFaultSeqLstUpdatedFile
public String getFaultSeqLstUpdatedFile()
-
setFaultSeqLstUpdatedFile
public void setFaultSeqLstUpdatedFile(String faultSeqLstUpdatedFile)
-
getClassMediatorClassLoaders
public Map<String,ClassLoader> getClassMediatorClassLoaders()
-
addClassMediatorClassLoader
public void addClassMediatorClassLoader(String path, ClassLoader classLoader)
-
removeClassMediatorClassLoader
public void removeClassMediatorClassLoader(String path)
-
-