|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatg.deployment.server.AgentRef
public class AgentRef
The server-side reference to a remote deployment agent. The server agent-ref has key information about the deployment for the server and houses the actual transport implementation for communicating with the agent. Though the Target object will most likely be all that is required, the AgentRef reveals a finer granularity of information about the target.
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.
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
java.util.Map |
mAgentHostLocalPortCache
|
Fields inherited from interface atg.deployment.common.Constants |
---|
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_MANIFEST_ID, 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_TX_SIZE, 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_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 |
Fields inherited from interface atg.deployment.DeploymentConstants |
---|
DEPLOYABLE_ATTRIBUTE_NAME, DEPLOYMENT_SYSTEM_VERSION, JAR_ATTR_MAN_FILE, JAR_ATTR_MAN_ID, JAR_ATTR_VERSION, MODE_ONLINE, MODE_SWITCH, PM_DEP, REFERENCES_ATTRIBUTE_NAME, TYPE_FULL, TYPE_INCREMENTAL |
Constructor Summary | |
---|---|
protected |
AgentRef()
Constructor for testing only. |
Method Summary | |
---|---|
Status |
abortApply(java.lang.String pDeploymentID)
Tells the agent to abort the manifest application. |
Status |
applyManifest(java.lang.String pDeploymentID,
boolean pFirstApply,
java.util.Map pAssetDestinations)
Tells the agent to deploy the prepared manifest. Note that this method will return before the deployment is finished. |
Status |
cancelDeployment(java.lang.String pDeploymentID)
Tells the agent to cancel the deployment. |
Status |
deleteManifest(java.lang.String pManifestID)
Deletes the manifest from the 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. |
int |
getTransactionSize()
The number of transactions to batch together during the agent's apply phase. |
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. |
Status |
installManifest(java.lang.String pDeploymentID,
atg.deployment.manifest.Manifest pManifest)
Transfers the given manifest to the remote deployment agent. |
Status |
loadManifest(java.lang.String pDeploymentID,
java.lang.String pManifestID)
Loads the specified manifest into the agent for the deployment operation. |
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)
|
void |
setTransactionSize(int pTransactionSize)
The number of transactions to batch together during the agent's apply phase. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
public java.util.Map mAgentHostLocalPortCache
Constructor Detail |
---|
protected AgentRef()
Method Detail |
---|
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 setTransactionSize(int pTransactionSize)
During the deployment application phase many operations will be
performed, e.g. each repository addItem(), udpateItem(), and
removeItem() count as an operation. For those operations that
are transactional the size of the transaction could get large.
This value specifies the maximum number of operations to batch
into a single transaction before committing and starting a new
transaction. Setting this value to zero or less will make the
deployment application use a single transaction. The default
value can be found in
atg.deployment.Constants.APPLY_TRANSACTION_SIZE
.
pTransactionSize
- new value to setpublic int getTransactionSize()
During the deployment application phase many operations will be
performed, e.g. each repository addItem(), udpateItem(), and
removeItem() count as an operation. For those operations that
are transactional the size of the transaction could get large.
This value specifies the maximum number of operations to batch
into a single transaction before commiting and starting a new
transaction. Setting this value to zero or less will make the
deployment application use a single transaction. The default
value can be found in
atg.deployment.Constants.APPLY_TRANSACTION_SIZE
.
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 loadManifest(java.lang.String pDeploymentID, java.lang.String pManifestID)
pDeploymentID
- current deployment identifierpManifestID
- identifier for the manifest to be loaded
public Status installManifest(java.lang.String pDeploymentID, atg.deployment.manifest.Manifest pManifest)
The specfic means of transfer are up to the transport implementation, so the manifest is given here on a whole (i.e. the manifest object itself which contains references to the deployment data internally).
pDeploymentID
- identifier for this deploymentpManifest
- the manifest being sent to the agent
public Status applyManifest(java.lang.String pDeploymentID, boolean pFirstApply, java.util.Map pAssetDestinations)
pDeploymentID
- identifier for this deployment
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 deployment
public Status recoverAgent(java.lang.String pDeploymentID, java.util.Map pRecoverInfo)
public Status deleteManifest(java.lang.String pManifestID)
pManifestID
- the ID of the manifest to delete from the agent
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)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |