|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wso2.carbon.utils.deployment.GhostDeployerUtils
public class GhostDeployerUtils
A collection of utility methods which are used by the Ghost Deployer
| Field Summary | |
|---|---|
static String |
ENABLED
|
static String |
GHOST_DEPLOYMENT
|
static String |
PARTIAL_UPDATE_MODE
|
| Method Summary | |
|---|---|
static void |
addServiceGroupToTransitMap(org.apache.axis2.description.AxisServiceGroup serviceGroup,
org.apache.axis2.engine.AxisConfiguration axisConfig)
Adds the given service group to the transit map |
static String |
calculateGhostFileName(String fileName,
String repoPath)
Calculate the ghost file name using the original file name. |
static org.apache.axis2.description.AxisServiceGroup |
createGhostServiceGroup(org.apache.axis2.engine.AxisConfiguration axisConfig,
File ghostFile,
URL originalFile)
Creates the Ghost ServiceGroup by reading the ghost metadata file. |
static org.apache.axis2.description.AxisService |
deployActualService(org.apache.axis2.engine.AxisConfiguration axisConfig,
org.apache.axis2.description.AxisService ghostService)
Removes the given ghost service and deploys the actual service. |
static void |
deployGhostArtifacts(org.apache.axis2.engine.AxisConfiguration axisConfig)
|
static void |
deployGhostServiceGroup(File ghostFile,
org.apache.axis2.deployment.repository.util.DeploymentFileData deploymentFileData,
org.apache.axis2.engine.AxisConfiguration axisConfig)
Load ghost services corresponding to a given axis2 service group |
static org.apache.axis2.description.AxisService |
dispatchServiceFromTransitGhosts(org.apache.axis2.context.MessageContext msgCtx)
When a ghost service is removed from the axisConfig and the corresponding actual service is deployed, there's a time interval in which there's no AxisService in the AxisConfiguration for the particular service name. |
static GhostArtifactRepository |
getGhostArtifactRepository(org.apache.axis2.engine.AxisConfiguration axisConfig)
get the ghost registry that store @DeploymentFileData objects of services that are in ghost state. |
static File |
getGhostFile(String fileName,
org.apache.axis2.engine.AxisConfiguration axisConfig)
Creates a File instance for the ghost service according to the original file name.. |
static Map<String,org.apache.axis2.description.AxisService> |
getTransitGhostServicesMap(org.apache.axis2.engine.AxisConfiguration axisConfig)
Get the map of services which are in transit. |
static boolean |
isGhostOn()
Read the "Enabled" property under "GhostDeployment" config from the carbon.xml and return the boolean value |
static boolean |
isGhostService(org.apache.axis2.description.AxisService axisService)
Checks if the given Axis service is a ghost service. |
static boolean |
isPartialUpdateEnabled()
Deprecated. |
static void |
removeGhostFile(String filePath,
org.apache.axis2.engine.AxisConfiguration axisConfig)
|
static void |
removeServiceGroupFromTransitMap(org.apache.axis2.description.AxisServiceGroup serviceGroup,
org.apache.axis2.engine.AxisConfiguration axisConfig)
Removes given service group from transit map |
static String |
separatorsToUnix(String path)
|
static void |
serializeServiceGroup(Set<org.apache.axis2.description.AxisService> services,
org.apache.axis2.deployment.repository.util.DeploymentFileData deploymentFileData,
org.apache.axis2.engine.AxisConfiguration axisConfig)
Creates the ghost file for the current service group. |
static void |
setGhostArtifactRepository(GhostArtifactRepository ghostArtifactRepository,
org.apache.axis2.engine.AxisConfiguration axisConfig)
ghost registry stores @DeploymentFileData objects of services that are in ghost state. |
static void |
updateLastUsedTime(org.apache.axis2.description.AxisService service)
Updates the last used timestamp of the given service. |
static void |
waitForServiceToLeaveTransit(String serviceName,
org.apache.axis2.engine.AxisConfiguration axisConfig)
When a ghost service is removed from the AxisConfiguration, name of that service is kept temporary in a map. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String GHOST_DEPLOYMENT
public static final String ENABLED
public static final String PARTIAL_UPDATE_MODE
| Method Detail |
|---|
public static org.apache.axis2.description.AxisService deployActualService(org.apache.axis2.engine.AxisConfiguration axisConfig,
org.apache.axis2.description.AxisService ghostService)
throws org.apache.axis2.AxisFault
axisConfig - - AxisConfiguration instanceghostService - - Existing Ghost service
org.apache.axis2.AxisFault - - On errors while removing existing servicepublic static void updateLastUsedTime(org.apache.axis2.description.AxisService service)
service - - AxisService instancepublic static boolean isGhostOn()
@Deprecated public static boolean isPartialUpdateEnabled()
public static Map<String,org.apache.axis2.description.AxisService> getTransitGhostServicesMap(org.apache.axis2.engine.AxisConfiguration axisConfig)
throws org.apache.axis2.AxisFault
axisConfig - - AxisConfiguration instance
org.apache.axis2.AxisFault - - on error while getting or setting map
public static org.apache.axis2.description.AxisService dispatchServiceFromTransitGhosts(org.apache.axis2.context.MessageContext msgCtx)
throws org.apache.axis2.AxisFault
msgCtx - - MessageContext for the current request
org.apache.axis2.AxisFault - - on errors while calling Axis2 APIs
public static void waitForServiceToLeaveTransit(String serviceName,
org.apache.axis2.engine.AxisConfiguration axisConfig)
throws org.apache.axis2.AxisFault
serviceName - - name of the serviceaxisConfig - - current axisConfig instance
org.apache.axis2.AxisFault - - on errors while reading ghost mappublic static boolean isGhostService(org.apache.axis2.description.AxisService axisService)
axisService - - The AxisService object to be checked if it's a ghost service
public static org.apache.axis2.description.AxisServiceGroup createGhostServiceGroup(org.apache.axis2.engine.AxisConfiguration axisConfig,
File ghostFile,
URL originalFile)
axisConfig - - AxisConfiguration instanceghostFile - - Ghost metadata fileoriginalFile - - URL of the original service artifact
public static void serializeServiceGroup(Set<org.apache.axis2.description.AxisService> services,
org.apache.axis2.deployment.repository.util.DeploymentFileData deploymentFileData,
org.apache.axis2.engine.AxisConfiguration axisConfig)
services - - Services to be serializeddeploymentFileData - - Absolute path to the service artifactaxisConfig - - AxisConfiguration instance
public static String calculateGhostFileName(String fileName,
String repoPath)
fileName - - original file namerepoPath - - path of the axis2 repository
public static File getGhostFile(String fileName,
org.apache.axis2.engine.AxisConfiguration axisConfig)
fileName - - original service file nameaxisConfig - - AxisConfiguration instance
public static void addServiceGroupToTransitMap(org.apache.axis2.description.AxisServiceGroup serviceGroup,
org.apache.axis2.engine.AxisConfiguration axisConfig)
throws org.apache.axis2.AxisFault
serviceGroup - - to be added to transit mapaxisConfig - - current axis configuration
org.apache.axis2.AxisFault - - on error
public static void removeServiceGroupFromTransitMap(org.apache.axis2.description.AxisServiceGroup serviceGroup,
org.apache.axis2.engine.AxisConfiguration axisConfig)
throws org.apache.axis2.AxisFault
serviceGroup - - to be removed from transit mapaxisConfig - - current axis configuration
org.apache.axis2.AxisFault - - on error
public static void deployGhostArtifacts(org.apache.axis2.engine.AxisConfiguration axisConfig)
throws org.apache.axis2.deployment.DeploymentException
org.apache.axis2.deployment.DeploymentException
public static void removeGhostFile(String filePath,
org.apache.axis2.engine.AxisConfiguration axisConfig)
public static void setGhostArtifactRepository(GhostArtifactRepository ghostArtifactRepository,
org.apache.axis2.engine.AxisConfiguration axisConfig)
throws org.apache.axis2.deployment.DeploymentException
ghostArtifactRepository - Set the ghost artifact registry for this tenantaxisConfig - The axis configuration of the tenant
org.apache.axis2.deployment.DeploymentException - if error occurred while saving the ghost artifact registrypublic static GhostArtifactRepository getGhostArtifactRepository(org.apache.axis2.engine.AxisConfiguration axisConfig)
axisConfig - The axis configuration of the tenantpublic static String separatorsToUnix(String path)
public static void deployGhostServiceGroup(File ghostFile,
org.apache.axis2.deployment.repository.util.DeploymentFileData deploymentFileData,
org.apache.axis2.engine.AxisConfiguration axisConfig)
throws org.apache.axis2.deployment.DeploymentException
ghostFile - The ghost file that contains meta information to deploy a ghost servicedeploymentFileData - The deployment file data of the artifact we are about to deployaxisConfig - The axis configuration of the tenant
org.apache.axis2.deployment.DeploymentException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||