public class AgentRef
extends java.lang.Object
implements atg.deployment.common.Constants
The AgentRef contains information from the topology definition file for this agent:
The methods getState() and getStatus() provide information on the specific agent whereas Target.getStatus() combines the statuses returned from a list of agents.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
java.util.Map |
mAgentHostLocalPortCache |
ACCEPTED_FOR_TARGET, APPLY_TRANSACTION_SIZE, APPROVED_FOR_TARGET, DEPLOYED_TO_TARGET, DEPLOYMENT_PROTOCOL_VERSION, DEPLOYMENT_TYPE_BACK_DEPLOY, DEPLOYMENT_TYPE_DEPLOY_TO_INITIAL, DEPLOYMENT_TYPE_INIT_TARGET, DEPLOYMENT_TYPE_ONE_OFF_DEPLOY, DEPLOYMENT_TYPE_REVERT_DEPLOY, DEPLOYMENT_TYPE_STANDARD_DEPLOY, DPLY_CMD_ACTIVE_APPLY_COMMITTED, DPLY_CMD_AFFECTED_TYPES, DPLY_CMD_ASSET_DESTINATIONS, DPLY_CMD_CLUSTER_ID, DPLY_CMD_COMMAND, DPLY_CMD_DATASTORES_TO_SWITCH, DPLY_CMD_DEPLOYMENT_END_TIME, DPLY_CMD_DEPLOYMENT_ID, DPLY_CMD_DEPLOYMENT_START_TIME, DPLY_CMD_EXCLUDE_ASSET, DPLY_CMD_FIRST_APPLY, DPLY_CMD_FROM_SNAPSHOT, DPLY_CMD_INCLUDE_ASSET, DPLY_CMD_INSTALL_BYTES, DPLY_CMD_INSTALL_NUM_BYTES, DPLY_CMD_MODE, DPLY_CMD_ONEOFF, DPLY_CMD_PRINCIPAL, DPLY_CMD_PROJECTS, DPLY_CMD_PROTOCOL_VERSION, DPLY_CMD_RECOVERING, DPLY_CMD_REFRESH_REPOSITORIES, DPLY_CMD_RESUME, DPLY_CMD_ROLLBACK, DPLY_CMD_SCIEVENTS, DPLY_CMD_SERVER_NAME, DPLY_CMD_SET_AGENT_STATUS, DPLY_CMD_SWITCH_FIRST, DPLY_CMD_SWITCH_LIVE, DPLY_CMD_TO_SNAPSHOT, DPLY_CMD_TYPE, DPLY_CMD_USER_ID, DPLY_CMD_VERIFY_FILE_CHECKSUM, DPLY_CMD_VERIFY_FILE_COMPONENT_PATH, DPLY_CMD_VERIFY_FILE_LAST_MODIFIED, DPLY_CMD_VERIFY_FILE_PATH, DPLY_CMD_VERIFY_FILE_SIZE, DPLY_CMD_VFS_ORDER, HIDDEN_FROM_TARGET, INIT_BRANCH_LOCK_NAME, ONE_OFF, REMOTE_DYNAMIC_RELOAD_EXCEPTION, REMOTE_DYNAMIC_RELOAD_SUCCESS, REMOTE_SWITCH_EXCEPTION, REMOTE_SWITCH_SUCCESS, RENOUNCED_FOR_TARGET, ROLLBACK_DEPLOYMENT_FAILURE, STRICT_OP_DEFAULT, STRICT_OP_OVERRIDE_FALSE, STRICT_OP_OVERRIDE_TRUE, TARGET_INITIAL_STATE_PROJECT_ID, TOPOLOGY_AGENT_PRINCIPAL_ALL, TOPOLOGY_AGENT_PRINCIPAL_NONE, TOPOLOGY_AGENT_PRINCIPAL_REPOSITORY, TOPOLOGY_AGENT_PRINCIPAL_VFS, TOPOLOGY_DEPLOY_TYPE_ONE_OFF, TOPOLOGY_DEPLOY_TYPE_WORKFLOW, TOPOLOGY_TRANSPORT_JNDI, TOPOLOGY_TRANSPORT_RMI, WORKFLOW
DEPLOYABLE_ATTRIBUTE_NAME, DEPLOYMENT_SYSTEM_VERSION, EXPORT_ATTRIBUTE_NAME, IMPORT_ATTRIBUTE_NAME, JAR_ATTR_MAN_FILE, JAR_ATTR_MAN_ID, JAR_ATTR_VERSION, MODE_ONLINE, MODE_SWITCH, PM_DEP, REFERENCES_ATTRIBUTE_NAME, TYPE_FULL, TYPE_INCREMENTAL
Modifier | Constructor and Description |
---|---|
protected |
AgentRef()
Constructor for testing only.
|
Modifier and Type | Method and Description |
---|---|
Status |
abortApply(java.lang.String pDeploymentID)
Tells the agent to abort the application.
|
Status |
cancelDeployment(java.lang.String pDeploymentID)
Tells the agent to cancel the deployment.
|
void |
deleteDeployedSnapshotId()
Delete the deployed snapshot id from the cluster status for this agent.
|
Status |
doneCreate(java.lang.String pDeploymentID,
java.util.Map pAffectedTypes)
Notifies the agent of the affected item types for a particular
deployment via a Map with a key of affected repository path names
to a Set value of affected item types.
|
java.util.Collection |
getAllClusterStatus()
Wrapper call to the AgentTransport for this agent.
|
java.lang.String |
getClusterID() |
Status |
getCurrentStatus()
Wrapper call to AgentTransport.getStatus() for this agent.
|
java.util.Map |
getDestinationMap()
Mapping from source VFS destination to target VFS destination.
|
java.lang.String[] |
getExcludeAssetDestinations()
Specific asset destinations this agent is not to deploy.
|
java.lang.String |
getHostnameAndLocalPort(java.lang.String pSeperator)
Get hostname and local port for local FileDeploymentServer connections
seperated by the given Seperator string
|
java.lang.String |
getId()
Unique id of this deployment agent.
|
java.lang.String[] |
getIncludeAssetDestinations()
Specific asset destinations this agent is to deploy.
|
java.lang.String |
getName()
Name of this deployment agent.
|
java.lang.String[] |
getPrincipalAssets()
Asset types which this agent is responsible for deploying.
|
int |
getState()
Wrapper call to the AgentTransport for this agent.
|
Status |
getStatus()
Wrapper call to AgentTransport.getStatus(clusterID) for this agent.
|
Status |
getStatus(boolean pUseCache)
Wrapper call to AgentTransport.getStatus(clusterID) for this agent.
|
java.lang.String |
getTransportType()
Returns the transport type used by this agent, the same type used
in the XML topology definition file.
|
java.lang.String |
getTransportURI() |
boolean |
hasDeploymentResponsibilities()
Returns whether or not this Agent has deployment
responsibilities.
|
boolean |
initializeTransport()
If the transport failed to start up properly more attempts can be
made until the transport starts.
|
java.util.List |
mapDestinations(java.util.List pDestinations)
Maps any destinations that change name from the source-side name to the target-side name
|
java.util.Map |
mapDestinations(java.util.Map pDestinations)
Maps any destinations that change name from the source-side name to the target-side name.
|
java.lang.String[] |
mapDestinations(java.lang.String[] pDestinations)
Maps any destinations that change name from the source-side name to the target-side name
|
Status |
recoverAgent(java.lang.String pDeploymentID,
java.util.Map pRecoverInfo)
Recover the agent for the deployment.
|
boolean |
reinitializeTransport()
Destroys the current transport and initializes a new one.
|
boolean |
reinitializeTransport(Status pErrorStatus)
Destroys the current transport and initializes a new one.
|
Status |
setAgentStatus(java.lang.String pDeploymentID,
java.util.Map pToStatus)
Sets the agent's Status remotely from the Publishing server
to the specified Status
|
Status |
setClusterDestination(java.util.Set pClusterDestinations) |
void |
setClusterID(java.lang.String pClusterID) |
Status |
switchDatastores(java.util.List pDatastores)
Requests a switch of the specified datastores on this agent
server.
|
Status |
verifyFile(java.lang.String pComponentPath,
java.lang.String pFilePath,
long pChecksum,
long pFileSize,
long pLastModified)
Check if a file deployed to this agent has the given checksum,
size and last modified date
This operation can happen outside of a deployment so no deployment id is required.
|
public static java.lang.String CLASS_VERSION
public java.util.Map mAgentHostLocalPortCache
public java.lang.String getId()
public java.lang.String getName()
public java.lang.String[] getPrincipalAssets()
public java.lang.String[] getExcludeAssetDestinations()
public java.lang.String[] getIncludeAssetDestinations()
public java.util.Map getDestinationMap()
public java.lang.String getTransportType()
If the transport could not be initialized, the String BAD is returned.
public void setClusterID(java.lang.String pClusterID)
pClusterID
- public java.lang.String getClusterID()
public boolean initializeTransport()
Note: This method only tries to start the transport if it did not initially start. To change an agent's transport that is already running the topology XML file needs to be changed and the entire topology re-initialized.
public boolean reinitializeTransport()
public boolean reinitializeTransport(Status pErrorStatus)
public boolean hasDeploymentResponsibilities()
public int getState()
AgentTransport
public Status getStatus()
If the transport has not been initialized (or has been destroyed due to an error), an attempt will be made to initialize the transport. If the transport cannot be initialized, a Status with state set to Status.ERROR_TRANSPORT_UNINSTANTIATED will be returned. When possible an error message will be supplied and available from Status.getErrorMessage().
AgentTransport
public Status getStatus(boolean pUseCache)
If the transport has not been initialized (or has been destroyed due to an error), an attempt will be made to initialize the transport. If the transport cannot be initialized, a Status with state set to Status.ERROR_TRANSPORT_UNINSTANTIATED will be returned. When possible an error message will be supplied and available from Status.getErrorMessage().
AgentTransport
public Status getCurrentStatus()
If the transport has not been initialized (or has been destroyed due to an error), an attempt will be made to initialize the transport. If the transport cannot be initialized, a Status with state set to Status.ERROR_TRANSPORT_UNINSTANTIATED will be returned. When possible an error message will be supplied and available from Status.getErrorMessage().
AgentTransport
public java.util.Collection getAllClusterStatus()
AgentTransport
public java.lang.String getTransportURI() throws atg.deployment.common.DeploymentException
atg.deployment.common.DeploymentException
public Status doneCreate(java.lang.String pDeploymentID, java.util.Map pAffectedTypes)
public Status abortApply(java.lang.String pDeploymentID)
This usually happens because another agent in the target has failed.
public Status cancelDeployment(java.lang.String pDeploymentID)
pDeploymentID
- identifier for this deploymentpublic Status recoverAgent(java.lang.String pDeploymentID, java.util.Map pRecoverInfo)
public Status setAgentStatus(java.lang.String pDeploymentID, java.util.Map pToStatus)
public Status setClusterDestination(java.util.Set pClusterDestinations)
public Status switchDatastores(java.util.List pDatastores)
public java.util.Map mapDestinations(java.util.Map pDestinations)
public Status verifyFile(java.lang.String pComponentPath, java.lang.String pFilePath, long pChecksum, long pFileSize, long pLastModified)
public java.lang.String getHostnameAndLocalPort(java.lang.String pSeperator) throws atg.deployment.common.DeploymentException
pSeperator
- atg.deployment.common.DeploymentException
public java.lang.String[] mapDestinations(java.lang.String[] pDestinations)
public java.util.List mapDestinations(java.util.List pDestinations)
public void deleteDeployedSnapshotId()