mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Added configs to set poll, local, and remote timeouts separately (plus some code cleanup).
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6149 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -55,9 +55,6 @@ public class LinkValidationAction extends ActionExecuterAbstractBase
|
||||
public static final String PARAM_COMPARE_TO_STAGING = "compare-to-staging";
|
||||
public static final String PARAM_MONITOR = "monitor";
|
||||
|
||||
private int noThreads = 5;
|
||||
private int readTimeout = 30000;
|
||||
private int connectionTimeout = 10000;
|
||||
private LinkValidationService linkValidationService;
|
||||
private AVMService avmService;
|
||||
|
||||
@@ -83,35 +80,7 @@ public class LinkValidationAction extends ActionExecuterAbstractBase
|
||||
this.avmService = service;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the number of millseconds to wait for a connection
|
||||
*
|
||||
* @param connectionTimeout Number of milliseconds to wait for connection
|
||||
*/
|
||||
public void setConnectionTimeout(int connectionTimeout)
|
||||
{
|
||||
this.connectionTimeout = connectionTimeout;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the number of milliseconds to wait for a response
|
||||
*
|
||||
* @param readTimeout Number of milliseconds to wait for a response
|
||||
*/
|
||||
public void setReadTimeout(int readTimeout)
|
||||
{
|
||||
this.readTimeout = readTimeout;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the number of threads to use to gather broken links
|
||||
*
|
||||
* @param threads Number of threads to use to gather broken links
|
||||
*/
|
||||
public void setNoThreads(int threads)
|
||||
{
|
||||
this.noThreads = threads;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addParameterDefinitions(List<ParameterDefinition> paramList)
|
||||
@@ -183,8 +152,9 @@ public class LinkValidationAction extends ActionExecuterAbstractBase
|
||||
if (destWebappPath != null)
|
||||
{
|
||||
// get the object to represent the broken files
|
||||
HrefDifference hdiff = this.linkValidationService.getHrefDifference(webappPath, destWebappPath,
|
||||
this.connectionTimeout, this.readTimeout, this.noThreads, monitor);
|
||||
HrefDifference hdiff =
|
||||
this.linkValidationService.getHrefDifference(
|
||||
webappPath, destWebappPath, monitor);
|
||||
|
||||
// get the broken files created due to deletions and new/modified files
|
||||
HrefManifest brokenByDelete = this.linkValidationService.getHrefManifestBrokenByDelete(hdiff);
|
||||
|
Reference in New Issue
Block a user