You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@manifoldcf.apache.org by kw...@apache.org on 2010/10/04 16:32:28 UTC
svn commit: r1004255 [20/24] - in /incubator/lcf/trunk:
modules/connectors/activedirectory/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/activedirectory/
modules/connectors/documentum/connector/src/main/java/org/apache/manifoldc...
Modified: incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/Jobs.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/Jobs.java?rev=1004255&r1=1004254&r2=1004255&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/Jobs.java (original)
+++ incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/Jobs.java Mon Oct 4 14:32:19 2010
@@ -192,7 +192,7 @@ public class Jobs extends org.apache.man
*@param database is the database handle.
*/
public Jobs(IThreadContext threadContext, IDBInterface database)
- throws ACFException
+ throws ManifoldCFException
{
super(database,"jobs");
this.threadContext = threadContext;
@@ -207,7 +207,7 @@ public class Jobs extends org.apache.man
/** Install or upgrade this table.
*/
public void install(String outputTableName, String outputNameField, String connectionTableName, String connectionNameField)
- throws ACFException
+ throws ManifoldCFException
{
// Standard practice: Have a loop around everything, in case upgrade needs it.
while (true)
@@ -278,7 +278,7 @@ public class Jobs extends org.apache.man
/** Uninstall.
*/
public void deinstall()
- throws ACFException
+ throws ManifoldCFException
{
beginTransaction();
try
@@ -287,7 +287,7 @@ public class Jobs extends org.apache.man
scheduleManager.deinstall();
performDrop(null);
}
- catch (ACFException e)
+ catch (ManifoldCFException e)
{
signalRollback();
throw e;
@@ -307,7 +307,7 @@ public class Jobs extends org.apache.man
*@return the time, in minutes.
*/
public int getAnalyzeTime()
- throws ACFException
+ throws ManifoldCFException
{
// Since we never expect jobs to grow rapidly, every 24hrs should always be fine
return 24 * 60;
@@ -316,7 +316,7 @@ public class Jobs extends org.apache.man
/** Analyze job tables that need analysis.
*/
public void analyzeTables()
- throws ACFException
+ throws ManifoldCFException
{
analyzeTable();
}
@@ -324,7 +324,7 @@ public class Jobs extends org.apache.man
/** Read schedule records for a specified set of jobs. Cannot use caching!
*/
public ScheduleRecord[][] readScheduleRecords(Long[] jobIDs)
- throws ACFException
+ throws ManifoldCFException
{
Map uniqueIDs = new HashMap();
int i = 0;
@@ -366,7 +366,7 @@ public class Jobs extends org.apache.man
signalRollback();
throw e;
}
- catch (ACFException e)
+ catch (ManifoldCFException e)
{
signalRollback();
throw e;
@@ -405,7 +405,7 @@ public class Jobs extends org.apache.man
*@return the array of all jobs.
*/
public IJobDescription[] getAll()
- throws ACFException
+ throws ManifoldCFException
{
// Begin transaction
beginTransaction();
@@ -433,7 +433,7 @@ public class Jobs extends org.apache.man
}
return loadMultiple(ids,readOnlies);
}
- catch (ACFException e)
+ catch (ManifoldCFException e)
{
signalRollback();
throw e;
@@ -453,7 +453,7 @@ public class Jobs extends org.apache.man
*@return a resultset with "jobid" and "connectionname" fields.
*/
public IResultSet getActiveJobConnections()
- throws ACFException
+ throws ManifoldCFException
{
return performQuery("SELECT "+idField+" AS jobid,"+connectionNameField+" AS connectionname FROM "+getTableName()+" WHERE "+
statusField+" IN ("+
@@ -465,7 +465,7 @@ public class Jobs extends org.apache.man
*@return the array of connection names corresponding to active jobs.
*/
public String[] getActiveConnectionNames()
- throws ACFException
+ throws ManifoldCFException
{
IResultSet set = performQuery("SELECT DISTINCT "+connectionNameField+" FROM "+getTableName()+" WHERE "+
statusField+" IN ("+
@@ -484,7 +484,7 @@ public class Jobs extends org.apache.man
/** Are there any jobs that have a specified priority level */
public boolean hasPriorityJobs(int priority)
- throws ACFException
+ throws ManifoldCFException
{
IResultSet set = performQuery("SELECT * FROM "+getTableName()+" WHERE "+priorityField+"="+Integer.toString(priority)+
" AND "+
@@ -497,7 +497,7 @@ public class Jobs extends org.apache.man
/** Create a job.
*/
public IJobDescription create()
- throws ACFException
+ throws ManifoldCFException
{
JobDescription rval = new JobDescription();
rval.setIsNew(true);
@@ -509,7 +509,7 @@ public class Jobs extends org.apache.man
*@param id is the job id.
*/
public void delete(Long id)
- throws ACFException
+ throws ManifoldCFException
{
StringSetBuffer ssb = new StringSetBuffer();
ssb.add(getJobsKey());
@@ -525,7 +525,7 @@ public class Jobs extends org.apache.man
params.add(id);
performDelete("WHERE "+idField+"=?",params,cacheKeys);
}
- catch (ACFException e)
+ catch (ManifoldCFException e)
{
signalRollback();
throw e;
@@ -546,7 +546,7 @@ public class Jobs extends org.apache.man
*@return the editable job description.
*/
public IJobDescription load(Long id, boolean readOnly)
- throws ACFException
+ throws ManifoldCFException
{
return loadMultiple(new Long[]{id}, new boolean[]{readOnly})[0];
}
@@ -557,7 +557,7 @@ public class Jobs extends org.apache.man
*@return the array of objects, in order.
*/
public IJobDescription[] loadMultiple(Long[] ids, boolean[] readOnlies)
- throws ACFException
+ throws ManifoldCFException
{
// Build description objects
JobObjectDescription[] objectDescriptions = new JobObjectDescription[ids.length];
@@ -580,7 +580,7 @@ public class Jobs extends org.apache.man
*@param jobDescription is the job description.
*/
public void save(IJobDescription jobDescription)
- throws ACFException
+ throws ManifoldCFException
{
// The invalidation keys for this are both the general and the specific.
Long id = jobDescription.getID();
@@ -674,7 +674,7 @@ public class Jobs extends org.apache.man
cacheManager.invalidateKeys(ch);
}
- catch (ACFException e)
+ catch (ManifoldCFException e)
{
signalRollback();
throw e;
@@ -698,7 +698,7 @@ public class Jobs extends org.apache.man
/** This method is called on a restart.
*/
public void restart()
- throws ACFException
+ throws ManifoldCFException
{
beginTransaction();
try
@@ -760,7 +760,7 @@ public class Jobs extends org.apache.man
// No need to do anything to the queue; it looks like it can take care of
// itself.
}
- catch (ACFException e)
+ catch (ManifoldCFException e)
{
signalRollback();
throw e;
@@ -781,7 +781,7 @@ public class Jobs extends org.apache.man
*@param oldStatusValue is the current status value for the job.
*/
public void noteOutputConnectorDeregistration(Long jobID, int oldStatusValue)
- throws ACFException
+ throws ManifoldCFException
{
int newStatusValue;
// The following states are special, in that when the underlying connector goes away, the jobs
@@ -828,7 +828,7 @@ public class Jobs extends org.apache.man
*@param oldStatusValue is the current status value for the job.
*/
public void noteOutputConnectorRegistration(Long jobID, int oldStatusValue)
- throws ACFException
+ throws ManifoldCFException
{
int newStatusValue;
// The following states are special, in that when the underlying connector returns, the jobs
@@ -871,7 +871,7 @@ public class Jobs extends org.apache.man
*@param oldStatusValue is the current status value for the job.
*/
public void noteConnectorDeregistration(Long jobID, int oldStatusValue)
- throws ACFException
+ throws ManifoldCFException
{
int newStatusValue;
// The following states are special, in that when the underlying connector goes away, the jobs
@@ -915,7 +915,7 @@ public class Jobs extends org.apache.man
*@param oldStatusValue is the current status value for the job.
*/
public void noteConnectorRegistration(Long jobID, int oldStatusValue)
- throws ACFException
+ throws ManifoldCFException
{
int newStatusValue;
// The following states are special, in that when the underlying connector returns, the jobs
@@ -955,7 +955,7 @@ public class Jobs extends org.apache.man
* is signalled.
*/
public void noteConnectionChange(String connectionName)
- throws ACFException
+ throws ManifoldCFException
{
// No cache keys need invalidation, since we're changing the start time, not the status.
HashMap newValues = new HashMap();
@@ -970,7 +970,7 @@ public class Jobs extends org.apache.man
* is signalled.
*/
public void noteOutputConnectionChange(String connectionName)
- throws ACFException
+ throws ManifoldCFException
{
// No cache keys need invalidation, since we're changing the start time, not the status.
HashMap newValues = new HashMap();
@@ -983,7 +983,7 @@ public class Jobs extends org.apache.man
/** Check whether a job's status indicates that it is in ACTIVE or ACTIVESEEDING state.
*/
public boolean checkJobActive(Long jobID)
- throws ACFException
+ throws ManifoldCFException
{
StringSet cacheKeys = new StringSet(getJobStatusKey());
ArrayList list = new ArrayList();
@@ -1002,7 +1002,7 @@ public class Jobs extends org.apache.man
/** Reset startup worker thread status.
*/
public void resetStartupWorkerStatus()
- throws ACFException
+ throws ManifoldCFException
{
// We have to handle all states that the startup thread would resolve, and change them to something appropriate.
@@ -1027,7 +1027,7 @@ public class Jobs extends org.apache.man
/** Reset as part of restoring seeding worker threads.
*/
public void resetSeedingWorkerStatus()
- throws ACFException
+ throws ManifoldCFException
{
beginTransaction();
try
@@ -1074,7 +1074,7 @@ public class Jobs extends org.apache.man
performUpdate(map,"WHERE "+statusField+"=?",list,invKey);
}
- catch (ACFException e)
+ catch (ManifoldCFException e)
{
signalRollback();
throw e;
@@ -1097,7 +1097,7 @@ public class Jobs extends org.apache.man
*@param windowEnd is the window end time, if any
*/
public void startJob(Long jobID, Long windowEnd)
- throws ACFException
+ throws ManifoldCFException
{
ArrayList list = new ArrayList();
list.add(jobID);
@@ -1115,7 +1115,7 @@ public class Jobs extends org.apache.man
*@param startTime is the current time in milliseconds from start of epoch.
*/
public void noteJobStarted(Long jobID, long startTime)
- throws ACFException
+ throws ManifoldCFException
{
beginTransaction();
try
@@ -1125,7 +1125,7 @@ public class Jobs extends org.apache.man
IResultSet set = performQuery("SELECT "+statusField+","+connectionNameField+","+outputNameField+" FROM "+getTableName()+" WHERE "+
idField+"=? FOR UPDATE",list,null,null);
if (set.getRowCount() == 0)
- throw new ACFException("Can't find job "+jobID.toString());
+ throw new ManifoldCFException("Can't find job "+jobID.toString());
IResultRow row = set.getRow(0);
int status = stringToStatus((String)row.getValue(statusField));
int newStatus;
@@ -1155,7 +1155,7 @@ public class Jobs extends org.apache.man
break;
default:
// Complain!
- throw new ACFException("Unexpected job status encountered: "+Integer.toString(status));
+ throw new ManifoldCFException("Unexpected job status encountered: "+Integer.toString(status));
}
HashMap map = new HashMap();
@@ -1167,7 +1167,7 @@ public class Jobs extends org.apache.man
map.put(lastCheckTimeField,new Long(startTime));
performUpdate(map,"WHERE "+idField+"=?",list,new StringSet(getJobStatusKey()));
}
- catch (ACFException e)
+ catch (ManifoldCFException e)
{
signalRollback();
throw e;
@@ -1188,7 +1188,7 @@ public class Jobs extends org.apache.man
*@param seedTime is the job seed time.
*/
public void noteJobSeeded(Long jobID, long seedTime)
- throws ACFException
+ throws ManifoldCFException
{
// We have to convert the current status to the non-seeding equivalent
beginTransaction();
@@ -1199,7 +1199,7 @@ public class Jobs extends org.apache.man
IResultSet set = performQuery("SELECT "+statusField+" FROM "+getTableName()+" WHERE "+
idField+"=? FOR UPDATE",list,null,null);
if (set.getRowCount() == 0)
- throw new ACFException("Can't find job "+jobID.toString());
+ throw new ManifoldCFException("Can't find job "+jobID.toString());
IResultRow row = set.getRow(0);
int status = stringToStatus((String)row.getValue(statusField));
int newStatus;
@@ -1233,7 +1233,7 @@ public class Jobs extends org.apache.man
newStatus = STATUS_ABORTINGFORRESTART;
break;
default:
- throw new ACFException("Unexpected job status encountered: "+Integer.toString(status));
+ throw new ManifoldCFException("Unexpected job status encountered: "+Integer.toString(status));
}
HashMap map = new HashMap();
map.put(statusField,statusToString(newStatus));
@@ -1245,7 +1245,7 @@ public class Jobs extends org.apache.man
signalRollback();
throw e;
}
- catch (ACFException e)
+ catch (ManifoldCFException e)
{
signalRollback();
throw e;
@@ -1263,7 +1263,7 @@ public class Jobs extends org.apache.man
*@param windowEnd is the window end time, if any.
*/
public void unwaitJob(Long jobID, int newStatus, Long windowEnd)
- throws ACFException
+ throws ManifoldCFException
{
ArrayList list = new ArrayList();
list.add(jobID);
@@ -1279,7 +1279,7 @@ public class Jobs extends org.apache.man
* STATUS_ACTIVEWAITSEEDING or STATUS_PAUSEDWAITSEEDING)
*/
public void waitJob(Long jobID, int newStatus)
- throws ACFException
+ throws ManifoldCFException
{
ArrayList list = new ArrayList();
list.add(jobID);
@@ -1295,7 +1295,7 @@ public class Jobs extends org.apache.man
*@return true if there wasn't an abort already logged for this job.
*/
public boolean abortJob(Long jobID, String errorText)
- throws ACFException
+ throws ManifoldCFException
{
beginTransaction();
try
@@ -1306,7 +1306,7 @@ public class Jobs extends org.apache.man
IResultSet set = performQuery("SELECT "+statusField+" FROM "+getTableName()+
" WHERE "+idField+"=? FOR UPDATE",list,null,null);
if (set.getRowCount() == 0)
- throw new ACFException("Job does not exist: "+jobID);
+ throw new ManifoldCFException("Job does not exist: "+jobID);
IResultRow row = set.getRow(0);
int status = stringToStatus(row.getValue(statusField).toString());
if (status == STATUS_ABORTING || status == STATUS_ABORTINGSEEDING || status == STATUS_ABORTINGSTARTINGUP)
@@ -1340,7 +1340,7 @@ public class Jobs extends org.apache.man
newStatus = STATUS_ABORTINGSEEDING;
break;
default:
- throw new ACFException("Job "+jobID+" is not active");
+ throw new ManifoldCFException("Job "+jobID+" is not active");
}
// Pause the job
HashMap map = new HashMap();
@@ -1349,7 +1349,7 @@ public class Jobs extends org.apache.man
performUpdate(map,"WHERE "+idField+"=?",list,new StringSet(getJobStatusKey()));
return true;
}
- catch (ACFException e)
+ catch (ManifoldCFException e)
{
signalRollback();
throw e;
@@ -1369,7 +1369,7 @@ public class Jobs extends org.apache.man
*@param jobID is the job id.
*/
public void abortRestartJob(Long jobID)
- throws ACFException
+ throws ManifoldCFException
{
beginTransaction();
try
@@ -1380,7 +1380,7 @@ public class Jobs extends org.apache.man
IResultSet set = performQuery("SELECT "+statusField+" FROM "+getTableName()+
" WHERE "+idField+"=? FOR UPDATE",list,null,null);
if (set.getRowCount() == 0)
- throw new ACFException("Job does not exist: "+jobID);
+ throw new ManifoldCFException("Job does not exist: "+jobID);
IResultRow row = set.getRow(0);
int status = stringToStatus(row.getValue(statusField).toString());
if (status == STATUS_ABORTINGFORRESTART || status == STATUS_ABORTINGFORRESTARTSEEDING || status == STATUS_ABORTINGSTARTINGUPFORRESTART)
@@ -1411,14 +1411,14 @@ public class Jobs extends org.apache.man
newStatus = STATUS_ABORTINGFORRESTARTSEEDING;
break;
default:
- throw new ACFException("Job "+jobID+" is not restartable");
+ throw new ManifoldCFException("Job "+jobID+" is not restartable");
}
// reset the job
HashMap map = new HashMap();
map.put(statusField,statusToString(newStatus));
performUpdate(map,"WHERE "+idField+"=?",list,new StringSet(getJobStatusKey()));
}
- catch (ACFException e)
+ catch (ManifoldCFException e)
{
signalRollback();
throw e;
@@ -1438,7 +1438,7 @@ public class Jobs extends org.apache.man
*@param jobID is the job id.
*/
public void pauseJob(Long jobID)
- throws ACFException
+ throws ManifoldCFException
{
beginTransaction();
try
@@ -1449,7 +1449,7 @@ public class Jobs extends org.apache.man
IResultSet set = performQuery("SELECT "+statusField+" FROM "+getTableName()+
" WHERE "+idField+"=? FOR UPDATE",list,null,null);
if (set.getRowCount() == 0)
- throw new ACFException("Job does not exist: "+jobID);
+ throw new ManifoldCFException("Job does not exist: "+jobID);
IResultRow row = set.getRow(0);
int status = stringToStatus(row.getValue(statusField).toString());
int newStatus;
@@ -1474,14 +1474,14 @@ public class Jobs extends org.apache.man
newStatus = STATUS_PAUSEDWAITSEEDING;
break;
default:
- throw new ACFException("Job "+jobID+" is not active");
+ throw new ManifoldCFException("Job "+jobID+" is not active");
}
// Pause the job
HashMap map = new HashMap();
map.put(statusField,statusToString(newStatus));
performUpdate(map,"WHERE "+idField+"=?",list,new StringSet(getJobStatusKey()));
}
- catch (ACFException e)
+ catch (ManifoldCFException e)
{
signalRollback();
throw e;
@@ -1501,7 +1501,7 @@ public class Jobs extends org.apache.man
*@param jobID is the job id.
*/
public void restartJob(Long jobID)
- throws ACFException
+ throws ManifoldCFException
{
beginTransaction();
try
@@ -1512,7 +1512,7 @@ public class Jobs extends org.apache.man
IResultSet set = performQuery("SELECT "+statusField+","+connectionNameField+","+outputNameField+" FROM "+getTableName()+
" WHERE "+idField+"=? FOR UPDATE",list,null,null);
if (set.getRowCount() == 0)
- throw new ACFException("Job does not exist: "+jobID);
+ throw new ManifoldCFException("Job does not exist: "+jobID);
IResultRow row = set.getRow(0);
int status = stringToStatus(row.getValue(statusField).toString());
String connectionName = (String)row.getValue(connectionNameField);
@@ -1559,14 +1559,14 @@ public class Jobs extends org.apache.man
newStatus = STATUS_ACTIVEWAITSEEDING;
break;
default:
- throw new ACFException("Job "+jobID+" is not paused");
+ throw new ManifoldCFException("Job "+jobID+" is not paused");
}
// Pause the job
HashMap map = new HashMap();
map.put(statusField,statusToString(newStatus));
performUpdate(map,"WHERE "+idField+"=?",list,new StringSet(getJobStatusKey()));
}
- catch (ACFException e)
+ catch (ManifoldCFException e)
{
signalRollback();
throw e;
@@ -1588,7 +1588,7 @@ public class Jobs extends org.apache.man
*@param reseedTime is the reseed time.
*/
public void writeStatus(Long jobID, int status, Long reseedTime)
- throws ACFException
+ throws ManifoldCFException
{
ArrayList list = new ArrayList();
list.add(jobID);
@@ -1603,7 +1603,7 @@ public class Jobs extends org.apache.man
*@param status is the desired status.
*/
public void writeStatus(Long jobID, int status)
- throws ACFException
+ throws ManifoldCFException
{
ArrayList list = new ArrayList();
list.add(jobID);
@@ -1617,7 +1617,7 @@ public class Jobs extends org.apache.man
*@param currentTime is the current time.
*/
public void updateLastTime(Long jobID, long currentTime)
- throws ACFException
+ throws ManifoldCFException
{
ArrayList list = new ArrayList();
list.add(jobID);
@@ -1632,7 +1632,7 @@ public class Jobs extends org.apache.man
*@param finishTime is the finish time.
*/
public void finishJob(Long jobID, long finishTime)
- throws ACFException
+ throws ManifoldCFException
{
ArrayList list = new ArrayList();
list.add(jobID);
@@ -1651,7 +1651,7 @@ public class Jobs extends org.apache.man
*@param jobID is the job id.
*/
public void finishAbortJob(Long jobID, long abortTime)
- throws ACFException
+ throws ManifoldCFException
{
ArrayList list = new ArrayList();
list.add(jobID);
@@ -1669,7 +1669,7 @@ public class Jobs extends org.apache.man
*@param jobID is the job id.
*/
public void notificationComplete(Long jobID)
- throws ACFException
+ throws ManifoldCFException
{
ArrayList list = new ArrayList();
list.add(jobID);
@@ -1684,7 +1684,7 @@ public class Jobs extends org.apache.man
*@return true if there is a reference, false otherwise.
*/
public boolean checkIfReference(String connectionName)
- throws ACFException
+ throws ManifoldCFException
{
ArrayList list = new ArrayList();
list.add(connectionName);
@@ -1698,7 +1698,7 @@ public class Jobs extends org.apache.man
*@return true if there is a reference, false otherwise.
*/
public boolean checkIfOutputReference(String connectionName)
- throws ACFException
+ throws ManifoldCFException
{
ArrayList list = new ArrayList();
list.add(connectionName);
@@ -1712,7 +1712,7 @@ public class Jobs extends org.apache.man
*@return the set of job id's associated with that connection.
*/
public IJobDescription[] findJobsForConnection(String connectionName)
- throws ACFException
+ throws ManifoldCFException
{
// Begin transaction
beginTransaction();
@@ -1741,7 +1741,7 @@ public class Jobs extends org.apache.man
}
return loadMultiple(ids,readOnlies);
}
- catch (ACFException e)
+ catch (ManifoldCFException e)
{
signalRollback();
throw e;
@@ -1764,7 +1764,7 @@ public class Jobs extends org.apache.man
*@return true if such jobs exist.
*/
public boolean deletingJobsPresent()
- throws ACFException
+ throws ManifoldCFException
{
IResultSet set = performQuery("SELECT "+idField+" FROM "+getTableName()+" WHERE "+
statusField+" IN ("+quoteSQLString(statusToString(STATUS_READYFORDELETE))+","+
@@ -1779,7 +1779,7 @@ public class Jobs extends org.apache.man
*@return true if such jobs exist.
*/
public boolean activeJobsPresent()
- throws ACFException
+ throws ManifoldCFException
{
// To improve the postgres CPU usage of the system at rest, we do a *fast* check to be
// sure there are ANY jobs in an active state.
@@ -1798,11 +1798,11 @@ public class Jobs extends org.apache.man
*@return the status value.
*/
public static int stringToStatus(String value)
- throws ACFException
+ throws ManifoldCFException
{
Integer x = (Integer)statusMap.get(value);
if (x == null)
- throw new ACFException("Bad status value: '"+value+"'");
+ throw new ManifoldCFException("Bad status value: '"+value+"'");
return x.intValue();
}
@@ -1811,7 +1811,7 @@ public class Jobs extends org.apache.man
*@return the string.
*/
public static String statusToString(int status)
- throws ACFException
+ throws ManifoldCFException
{
switch (status)
{
@@ -1871,7 +1871,7 @@ public class Jobs extends org.apache.man
return "D";
default:
- throw new ACFException("Bad status value: "+Integer.toString(status));
+ throw new ManifoldCFException("Bad status value: "+Integer.toString(status));
}
}
@@ -1880,11 +1880,11 @@ public class Jobs extends org.apache.man
*@return the type value.
*/
public static int stringToType(String value)
- throws ACFException
+ throws ManifoldCFException
{
Integer x = (Integer)typeMap.get(value);
if (x == null)
- throw new ACFException("Bad type value: '"+value+"'");
+ throw new ManifoldCFException("Bad type value: '"+value+"'");
return x.intValue();
}
@@ -1893,7 +1893,7 @@ public class Jobs extends org.apache.man
*@return the string.
*/
public static String typeToString(int type)
- throws ACFException
+ throws ManifoldCFException
{
switch (type)
{
@@ -1902,27 +1902,27 @@ public class Jobs extends org.apache.man
case TYPE_SPECIFIED:
return "S";
default:
- throw new ACFException("Bad type: "+Integer.toString(type));
+ throw new ManifoldCFException("Bad type: "+Integer.toString(type));
}
}
/** Go from string to hopcount mode.
*/
public static int stringToHopcountMode(String value)
- throws ACFException
+ throws ManifoldCFException
{
if (value == null || value.length() == 0)
return HOPCOUNT_ACCURATE;
Integer x = (Integer)hopmodeMap.get(value);
if (x == null)
- throw new ACFException("Bad hopcount mode value: '"+value+"'");
+ throw new ManifoldCFException("Bad hopcount mode value: '"+value+"'");
return x.intValue();
}
/** Go from hopcount mode to string.
*/
public static String hopcountModeToString(int value)
- throws ACFException
+ throws ManifoldCFException
{
switch(value)
{
@@ -1933,7 +1933,7 @@ public class Jobs extends org.apache.man
case HOPCOUNT_NEVERDELETE:
return "V";
default:
- throw new ACFException("Unknown hopcount mode value "+Integer.toString(value));
+ throw new ManifoldCFException("Unknown hopcount mode value "+Integer.toString(value));
}
}
@@ -1942,11 +1942,11 @@ public class Jobs extends org.apache.man
*@return the start method value.
*/
public static int stringToStartMethod(String value)
- throws ACFException
+ throws ManifoldCFException
{
Integer x = (Integer)startMap.get(value);
if (x == null)
- throw new ACFException("Bad start method value: '"+value+"'");
+ throw new ManifoldCFException("Bad start method value: '"+value+"'");
return x.intValue();
}
@@ -1955,7 +1955,7 @@ public class Jobs extends org.apache.man
*@return a string.
*/
public static String startMethodToString(int startMethod)
- throws ACFException
+ throws ManifoldCFException
{
switch(startMethod)
{
@@ -1966,7 +1966,7 @@ public class Jobs extends org.apache.man
case START_DISABLE:
return "D";
default:
- throw new ACFException("Bad start method: "+Integer.toString(startMethod));
+ throw new ManifoldCFException("Bad start method: "+Integer.toString(startMethod));
}
}
@@ -1976,7 +1976,7 @@ public class Jobs extends org.apache.man
*@return the enumerated value.
*/
public static EnumeratedValues stringToEnumeratedValue(String value)
- throws ACFException
+ throws ManifoldCFException
{
if (value == null)
return null;
@@ -2002,7 +2002,7 @@ public class Jobs extends org.apache.man
}
catch (NumberFormatException e)
{
- throw new ACFException("Bad number: '"+value+"'",e);
+ throw new ManifoldCFException("Bad number: '"+value+"'",e);
}
}
@@ -2054,7 +2054,7 @@ public class Jobs extends org.apache.man
*@return the corresponding job descriptions.
*/
protected JobDescription[] getJobsMultiple(Long[] ids)
- throws ACFException
+ throws ManifoldCFException
{
// Fetch all the jobs, but only once for each ID. Then, assign each one by id into the final array.
HashMap uniqueIDs = new HashMap();
@@ -2096,7 +2096,7 @@ public class Jobs extends org.apache.man
signalRollback();
throw e;
}
- catch (ACFException e)
+ catch (ManifoldCFException e)
{
signalRollback();
throw e;
@@ -2127,7 +2127,7 @@ public class Jobs extends org.apache.man
*@param params is the set of parameters.
*/
protected void getJobsChunk(Map returnValues, String idList, ArrayList params)
- throws ACFException
+ throws ManifoldCFException
{
try
{
@@ -2168,7 +2168,7 @@ public class Jobs extends org.apache.man
}
catch (NumberFormatException e)
{
- throw new ACFException("Bad number",e);
+ throw new ManifoldCFException("Bad number",e);
}
}
@@ -2275,7 +2275,7 @@ public class Jobs extends org.apache.man
* @return the newly created objects to cache, or null, if any object cannot be created.
* The order of the returned objects must correspond to the order of the object descriptinos.
*/
- public Object[] create(ICacheDescription[] objectDescriptions) throws ACFException
+ public Object[] create(ICacheDescription[] objectDescriptions) throws ManifoldCFException
{
// Turn the object descriptions into the parameters for the ToolInstance requests
Long[] ids = new Long[objectDescriptions.length];
@@ -2298,7 +2298,7 @@ public class Jobs extends org.apache.man
* @param objectDescription is the unique identifier of the object.
* @param cachedObject is the cached object.
*/
- public void exists(ICacheDescription objectDescription, Object cachedObject) throws ACFException
+ public void exists(ICacheDescription objectDescription, Object cachedObject) throws ManifoldCFException
{
// Cast what came in as what it really is
JobObjectDescription objectDesc = (JobObjectDescription)objectDescription;
@@ -2314,7 +2314,7 @@ public class Jobs extends org.apache.man
/** Perform the desired operation. This method is called after either createGetObject()
* or exists() is called for every requested object.
*/
- public void execute() throws ACFException
+ public void execute() throws ManifoldCFException
{
// Does nothing; we only want to fetch objects in this cacher.
}
Modified: incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/PrereqEventManager.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/PrereqEventManager.java?rev=1004255&r1=1004254&r2=1004255&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/PrereqEventManager.java (original)
+++ incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/PrereqEventManager.java Mon Oct 4 14:32:19 2010
@@ -50,7 +50,7 @@ public class PrereqEventManager extends
*@param database is the database handle.
*/
public PrereqEventManager(IDBInterface database)
- throws ACFException
+ throws ManifoldCFException
{
super(database,"prereqevents");
}
@@ -58,7 +58,7 @@ public class PrereqEventManager extends
/** Install or upgrade this table.
*/
public void install(String ownerTableName, String ownerColumn)
- throws ACFException
+ throws ManifoldCFException
{
// Standard practice: Outer loop for upgrade support.
while (true)
@@ -105,14 +105,14 @@ public class PrereqEventManager extends
/** Uninstall.
*/
public void deinstall()
- throws ACFException
+ throws ManifoldCFException
{
beginTransaction();
try
{
performDrop(null);
}
- catch (ACFException e)
+ catch (ManifoldCFException e)
{
signalRollback();
throw e;
@@ -130,7 +130,7 @@ public class PrereqEventManager extends
/** Delete specified rows, based on jobqueue criteria. */
public void deleteRows(String parentTableName, String joinField, String parentCriteria, ArrayList list)
- throws ACFException
+ throws ManifoldCFException
{
StringBuffer sb = new StringBuffer();
sb.append("WHERE EXISTS(SELECT 'x' FROM ").append(parentTableName).append(" WHERE ").append(joinField).append("=")
@@ -144,7 +144,7 @@ public class PrereqEventManager extends
/** Delete specified rows, as directly specified without a join. */
public void deleteRows(String ownerQueryPart, ArrayList list)
- throws ACFException
+ throws ManifoldCFException
{
performDelete("WHERE "+ownerField+" IN("+ownerQueryPart+")",list,null);
reindexTracker.noteEvent();
@@ -152,7 +152,7 @@ public class PrereqEventManager extends
/** Delete rows pertaining to a single entry */
public void deleteRows(Long recordID)
- throws ACFException
+ throws ManifoldCFException
{
ArrayList list = new ArrayList();
list.add(recordID);
@@ -162,7 +162,7 @@ public class PrereqEventManager extends
/** Add rows pertaining to a single entry */
public void addRows(Long recordID, String[] eventNames)
- throws ACFException
+ throws ManifoldCFException
{
if (eventNames != null)
{
@@ -181,7 +181,7 @@ public class PrereqEventManager extends
/** Conditionally do analyze operation.
*/
public void conditionallyMaintainTables()
- throws ACFException
+ throws ManifoldCFException
{
if (tracker.checkAction())
{
Modified: incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/ScheduleManager.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/ScheduleManager.java?rev=1004255&r1=1004254&r2=1004255&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/ScheduleManager.java (original)
+++ incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/ScheduleManager.java Mon Oct 4 14:32:19 2010
@@ -48,7 +48,7 @@ public class ScheduleManager extends org
*@param database is the database instance.
*/
public ScheduleManager(IThreadContext threadContext, IDBInterface database)
- throws ACFException
+ throws ManifoldCFException
{
super(database,"schedules");
}
@@ -58,7 +58,7 @@ public class ScheduleManager extends org
*@param owningTablePrimaryKey is the primary key of the owning table.
*/
public void install(String ownerTable, String owningTablePrimaryKey)
- throws ACFException
+ throws ManifoldCFException
{
// Standard practice: Outer loop to support upgrades
while (true)
@@ -125,7 +125,7 @@ public class ScheduleManager extends org
/** Uninstall.
*/
public void deinstall()
- throws ACFException
+ throws ManifoldCFException
{
performDrop(null);
}
@@ -136,7 +136,7 @@ public class ScheduleManager extends org
*@param ownerIDParams is the corresponding set of owner id parameters.
*/
public void getRows(Map returnValues, String ownerIDList, ArrayList ownerIDParams)
- throws ACFException
+ throws ManifoldCFException
{
IResultSet set = performQuery("SELECT * FROM "+getTableName()+" WHERE "+ownerIDField+" IN ("+ownerIDList+") ORDER BY "+ordinalField+" ASC",ownerIDParams,
null,null);
@@ -164,7 +164,7 @@ public class ScheduleManager extends org
*@param ownerIDParams is the corresponding set of owner id parameters.
*/
public void getRowsAlternate(Map returnValues, String ownerIDList, ArrayList ownerIDParams)
- throws ACFException
+ throws ManifoldCFException
{
IResultSet set = performQuery("SELECT * FROM "+getTableName()+" WHERE "+ownerIDField+" IN ("+ownerIDList+") ORDER BY "+ordinalField+" ASC",ownerIDParams,
null,null);
@@ -197,7 +197,7 @@ public class ScheduleManager extends org
*@param list is the job description that is the source of the schedule.
*/
public void writeRows(Long ownerID, IJobDescription list)
- throws ACFException
+ throws ManifoldCFException
{
beginTransaction();
try
@@ -222,7 +222,7 @@ public class ScheduleManager extends org
i++;
}
}
- catch (ACFException e)
+ catch (ManifoldCFException e)
{
signalRollback();
throw e;
@@ -242,7 +242,7 @@ public class ScheduleManager extends org
*@param ownerID is the owner whose rows to delete.
*/
public void deleteRows(Long ownerID)
- throws ACFException
+ throws ManifoldCFException
{
ArrayList list = new ArrayList();
list.add(ownerID);
@@ -254,7 +254,7 @@ public class ScheduleManager extends org
*@return the enumerated value.
*/
public static EnumeratedValues stringToEnumeratedValue(String value)
- throws ACFException
+ throws ManifoldCFException
{
if (value == null)
return null;
@@ -280,7 +280,7 @@ public class ScheduleManager extends org
}
catch (NumberFormatException e)
{
- throw new ACFException("Bad number: '"+value+"'",e);
+ throw new ManifoldCFException("Bad number: '"+value+"'",e);
}
}
Modified: incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/repository/RepositoryConnectionManager.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/repository/RepositoryConnectionManager.java?rev=1004255&r1=1004254&r2=1004255&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/repository/RepositoryConnectionManager.java (original)
+++ incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/repository/RepositoryConnectionManager.java Mon Oct 4 14:32:19 2010
@@ -23,7 +23,7 @@ import org.apache.manifoldcf.core.interf
import org.apache.manifoldcf.crawler.interfaces.*;
import org.apache.manifoldcf.authorities.interfaces.*;
import org.apache.manifoldcf.crawler.interfaces.CacheKeyFactory;
-import org.apache.manifoldcf.crawler.system.ACF;
+import org.apache.manifoldcf.crawler.system.ManifoldCF;
/** This class is the manager of the repository connection description. Inside, multiple database tables are managed,
@@ -60,7 +60,7 @@ public class RepositoryConnectionManager
*@param threadContext is the thread context.
*/
public RepositoryConnectionManager(IThreadContext threadContext, IDBInterface database)
- throws ACFException
+ throws ManifoldCFException
{
super(database,"repoconnections");
@@ -73,7 +73,7 @@ public class RepositoryConnectionManager
/** Install the manager.
*/
public void install()
- throws ACFException
+ throws ManifoldCFException
{
// First, get the authority manager table name and name column
IAuthorityConnectionManager authMgr = AuthorityConnectionManagerFactory.make(threadContext);
@@ -113,7 +113,7 @@ public class RepositoryConnectionManager
/** Uninstall the manager.
*/
public void deinstall()
- throws ACFException
+ throws ManifoldCFException
{
beginTransaction();
try
@@ -122,7 +122,7 @@ public class RepositoryConnectionManager
historyManager.deinstall();
performDrop(null);
}
- catch (ACFException e)
+ catch (ManifoldCFException e)
{
signalRollback();
throw e;
@@ -140,62 +140,62 @@ public class RepositoryConnectionManager
/** Export configuration */
public void exportConfiguration(java.io.OutputStream os)
- throws java.io.IOException, ACFException
+ throws java.io.IOException, ManifoldCFException
{
// Write a version indicator
- ACF.writeDword(os,1);
+ ManifoldCF.writeDword(os,1);
// Get the authority list
IRepositoryConnection[] list = getAllConnections();
// Write the number of authorities
- ACF.writeDword(os,list.length);
+ ManifoldCF.writeDword(os,list.length);
// Loop through the list and write the individual repository connection info
int i = 0;
while (i < list.length)
{
IRepositoryConnection conn = list[i++];
- ACF.writeString(os,conn.getName());
- ACF.writeString(os,conn.getDescription());
- ACF.writeString(os,conn.getClassName());
- ACF.writeString(os,conn.getConfigParams().toXML());
- ACF.writeString(os,conn.getACLAuthority());
- ACF.writeDword(os,conn.getMaxConnections());
+ ManifoldCF.writeString(os,conn.getName());
+ ManifoldCF.writeString(os,conn.getDescription());
+ ManifoldCF.writeString(os,conn.getClassName());
+ ManifoldCF.writeString(os,conn.getConfigParams().toXML());
+ ManifoldCF.writeString(os,conn.getACLAuthority());
+ ManifoldCF.writeDword(os,conn.getMaxConnections());
String[] throttles = conn.getThrottles();
- ACF.writeDword(os,throttles.length);
+ ManifoldCF.writeDword(os,throttles.length);
int j = 0;
while (j < throttles.length)
{
String throttleName = throttles[j++];
- ACF.writeString(os,throttleName);
- ACF.writeString(os,conn.getThrottleDescription(throttleName));
- ACF.writefloat(os,conn.getThrottleValue(throttleName));
+ ManifoldCF.writeString(os,throttleName);
+ ManifoldCF.writeString(os,conn.getThrottleDescription(throttleName));
+ ManifoldCF.writefloat(os,conn.getThrottleValue(throttleName));
}
}
}
/** Import configuration */
public void importConfiguration(java.io.InputStream is)
- throws java.io.IOException, ACFException
+ throws java.io.IOException, ManifoldCFException
{
- int version = ACF.readDword(is);
+ int version = ManifoldCF.readDword(is);
if (version != 1)
throw new java.io.IOException("Unknown repository connection configuration version: "+Integer.toString(version));
- int count = ACF.readDword(is);
+ int count = ManifoldCF.readDword(is);
int i = 0;
while (i < count)
{
IRepositoryConnection conn = create();
- conn.setName(ACF.readString(is));
- conn.setDescription(ACF.readString(is));
- conn.setClassName(ACF.readString(is));
- conn.getConfigParams().fromXML(ACF.readString(is));
- conn.setACLAuthority(ACF.readString(is));
- conn.setMaxConnections(ACF.readDword(is));
- int throttleCount = ACF.readDword(is);
+ conn.setName(ManifoldCF.readString(is));
+ conn.setDescription(ManifoldCF.readString(is));
+ conn.setClassName(ManifoldCF.readString(is));
+ conn.getConfigParams().fromXML(ManifoldCF.readString(is));
+ conn.setACLAuthority(ManifoldCF.readString(is));
+ conn.setMaxConnections(ManifoldCF.readDword(is));
+ int throttleCount = ManifoldCF.readDword(is);
int j = 0;
while (j < throttleCount)
{
- String throttleName = ACF.readString(is);
- conn.addThrottleValue(throttleName,ACF.readString(is),ACF.readfloat(is));
+ String throttleName = ManifoldCF.readString(is);
+ conn.addThrottleValue(throttleName,ManifoldCF.readString(is),ManifoldCF.readfloat(is));
j++;
}
// Attempt to save this connection
@@ -208,7 +208,7 @@ public class RepositoryConnectionManager
*@return an array of connection objects.
*/
public IRepositoryConnection[] getAllConnections()
- throws ACFException
+ throws ManifoldCFException
{
beginTransaction();
try
@@ -229,7 +229,7 @@ public class RepositoryConnectionManager
}
return loadMultiple(names);
}
- catch (ACFException e)
+ catch (ManifoldCFException e)
{
signalRollback();
throw e;
@@ -250,7 +250,7 @@ public class RepositoryConnectionManager
*@return the loaded connection object, or null if not found.
*/
public IRepositoryConnection load(String name)
- throws ACFException
+ throws ManifoldCFException
{
return loadMultiple(new String[]{name})[0];
}
@@ -260,7 +260,7 @@ public class RepositoryConnectionManager
*@return the loaded connection objects.
*/
public IRepositoryConnection[] loadMultiple(String[] names)
- throws ACFException
+ throws ManifoldCFException
{
// Build description objects
RepositoryConnectionDescription[] objectDescriptions = new RepositoryConnectionDescription[names.length];
@@ -283,7 +283,7 @@ public class RepositoryConnectionManager
*@return the new object.
*/
public IRepositoryConnection create()
- throws ACFException
+ throws ManifoldCFException
{
RepositoryConnection rval = new RepositoryConnection();
return rval;
@@ -294,7 +294,7 @@ public class RepositoryConnectionManager
*@return true if the object was created, false otherwise.
*/
public boolean save(IRepositoryConnection object)
- throws ACFException
+ throws ManifoldCFException
{
StringSetBuffer ssb = new StringSetBuffer();
ssb.add(getRepositoryConnectionsKey());
@@ -308,7 +308,7 @@ public class RepositoryConnectionManager
{
performLock();
// Notify of a change to the configuration
- ACF.noteConfigurationChange();
+ ManifoldCF.noteConfigurationChange();
// See whether the instance exists
ArrayList params = new ArrayList();
params.add(object.getName());
@@ -360,7 +360,7 @@ public class RepositoryConnectionManager
cacheManager.invalidateKeys(ch);
return isCreated;
}
- catch (ACFException e)
+ catch (ManifoldCFException e)
{
signalRollback();
throw e;
@@ -386,7 +386,7 @@ public class RepositoryConnectionManager
* name does not exist, no error is returned.
*/
public void delete(String name)
- throws ACFException
+ throws ManifoldCFException
{
// Grab a job manager handle. We will need to check if any jobs refer to this connection.
IJobManager jobManager = JobManagerFactory.make(threadContext);
@@ -403,8 +403,8 @@ public class RepositoryConnectionManager
{
// Check if any jobs refer to this connection name
if (jobManager.checkIfReference(name))
- throw new ACFException("Can't delete repository connection '"+name+"': existing jobs refer to it");
- ACF.noteConfigurationChange();
+ throw new ManifoldCFException("Can't delete repository connection '"+name+"': existing jobs refer to it");
+ ManifoldCF.noteConfigurationChange();
throttleSpecManager.deleteRows(name);
historyManager.deleteOwner(name,null);
ArrayList params = new ArrayList();
@@ -412,7 +412,7 @@ public class RepositoryConnectionManager
performDelete("WHERE "+nameField+"=?",params,null);
cacheManager.invalidateKeys(ch);
}
- catch (ACFException e)
+ catch (ManifoldCFException e)
{
signalRollback();
throw e;
@@ -439,7 +439,7 @@ public class RepositoryConnectionManager
*@return true if referenced, false otherwise.
*/
public boolean isReferenced(String authorityName)
- throws ACFException
+ throws ManifoldCFException
{
StringSetBuffer ssb = new StringSetBuffer();
ssb.add(getRepositoryConnectionsKey());
@@ -456,7 +456,7 @@ public class RepositoryConnectionManager
*@return the repository connections that use that connector.
*/
public String[] findConnectionsForConnector(String className)
- throws ACFException
+ throws ManifoldCFException
{
StringSetBuffer ssb = new StringSetBuffer();
ssb.add(getRepositoryConnectionsKey());
@@ -482,7 +482,7 @@ public class RepositoryConnectionManager
*@return true if the underlying connector is registered.
*/
public boolean checkConnectorExists(String name)
- throws ACFException
+ throws ManifoldCFException
{
beginTransaction();
try
@@ -495,13 +495,13 @@ public class RepositoryConnectionManager
IResultSet set = performQuery("SELECT "+classNameField+" FROM "+getTableName()+" WHERE "+nameField+"=?",params,
localCacheKeys,null);
if (set.getRowCount() == 0)
- throw new ACFException("No such connection: '"+name+"'");
+ throw new ManifoldCFException("No such connection: '"+name+"'");
IResultRow row = set.getRow(0);
String className = (String)row.getValue(classNameField);
IConnectorManager cm = ConnectorManagerFactory.make(threadContext);
return cm.isInstalled(className);
}
- catch (ACFException e)
+ catch (ManifoldCFException e)
{
signalRollback();
throw e;
@@ -553,7 +553,7 @@ public class RepositoryConnectionManager
*/
public void recordHistory(String connectionName, Long startTime, String activityType, Long dataSize,
String entityIdentifier, String resultCode, String resultDescription, String[] childIdentifiers)
- throws ACFException
+ throws ManifoldCFException
{
long endTimeValue = System.currentTimeMillis();
long startTimeValue;
@@ -585,7 +585,7 @@ public class RepositoryConnectionManager
*@return the number of rows included by the criteria.
*/
public long countHistoryRows(String connectionName, FilterCriteria criteria)
- throws ACFException
+ throws ManifoldCFException
{
return historyManager.countHistoryRows(connectionName,criteria);
}
@@ -601,7 +601,7 @@ public class RepositoryConnectionManager
*@param maxRowCount is the maximum number of rows to include.
*/
public IResultSet genHistorySimple(String connectionName, FilterCriteria criteria, SortOrder sort, int startRow, int maxRowCount)
- throws ACFException
+ throws ManifoldCFException
{
return historyManager.simpleReport(connectionName,criteria,sort,startRow,maxRowCount);
}
@@ -624,7 +624,7 @@ public class RepositoryConnectionManager
*/
public IResultSet genHistoryActivityCount(String connectionName, FilterCriteria criteria, SortOrder sort, BucketDescription idBucket,
long interval, int startRow, int maxRowCount)
- throws ACFException
+ throws ManifoldCFException
{
return historyManager.maxActivityCountReport(connectionName,criteria,sort,idBucket,interval,startRow,maxRowCount);
}
@@ -647,7 +647,7 @@ public class RepositoryConnectionManager
*/
public IResultSet genHistoryByteCount(String connectionName, FilterCriteria criteria, SortOrder sort, BucketDescription idBucket,
long interval, int startRow, int maxRowCount)
- throws ACFException
+ throws ManifoldCFException
{
return historyManager.maxByteCountReport(connectionName,criteria,sort,idBucket,interval,startRow,maxRowCount);
}
@@ -669,7 +669,7 @@ public class RepositoryConnectionManager
*/
public IResultSet genHistoryResultCodes(String connectionName, FilterCriteria criteria, SortOrder sort,
BucketDescription resultCodeBucket, BucketDescription idBucket, int startRow, int maxRowCount)
- throws ACFException
+ throws ManifoldCFException
{
return historyManager.resultCodesReport(connectionName,criteria,sort,resultCodeBucket,idBucket,startRow,maxRowCount);
}
@@ -701,7 +701,7 @@ public class RepositoryConnectionManager
*@return the corresponding repository connection objects.
*/
protected RepositoryConnection[] getRepositoryConnectionsMultiple(String[] connectionNames)
- throws ACFException
+ throws ManifoldCFException
{
RepositoryConnection[] rval = new RepositoryConnection[connectionNames.length];
HashMap returnIndex = new HashMap();
@@ -745,7 +745,7 @@ public class RepositoryConnectionManager
signalRollback();
throw e;
}
- catch (ACFException e)
+ catch (ManifoldCFException e)
{
signalRollback();
throw e;
@@ -763,7 +763,7 @@ public class RepositoryConnectionManager
*@param params is the set of parameters.
*/
protected void getRepositoryConnectionsChunk(RepositoryConnection[] rval, Map returnIndex, String idList, ArrayList params)
- throws ACFException
+ throws ManifoldCFException
{
IResultSet set;
set = performQuery("SELECT * FROM "+getTableName()+" WHERE "+
@@ -888,7 +888,7 @@ public class RepositoryConnectionManager
* @return the newly created objects to cache, or null, if any object cannot be created.
* The order of the returned objects must correspond to the order of the object descriptinos.
*/
- public Object[] create(ICacheDescription[] objectDescriptions) throws ACFException
+ public Object[] create(ICacheDescription[] objectDescriptions) throws ManifoldCFException
{
// Turn the object descriptions into the parameters for the ToolInstance requests
String[] connectionNames = new String[objectDescriptions.length];
@@ -911,7 +911,7 @@ public class RepositoryConnectionManager
* @param objectDescription is the unique identifier of the object.
* @param cachedObject is the cached object.
*/
- public void exists(ICacheDescription objectDescription, Object cachedObject) throws ACFException
+ public void exists(ICacheDescription objectDescription, Object cachedObject) throws ManifoldCFException
{
// Cast what came in as what it really is
RepositoryConnectionDescription objectDesc = (RepositoryConnectionDescription)objectDescription;
@@ -929,7 +929,7 @@ public class RepositoryConnectionManager
/** Perform the desired operation. This method is called after either createGetObject()
* or exists() is called for every requested object.
*/
- public void execute() throws ACFException
+ public void execute() throws ManifoldCFException
{
// Does nothing; we only want to fetch objects in this cacher.
}
Modified: incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/repository/RepositoryHistoryManager.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/repository/RepositoryHistoryManager.java?rev=1004255&r1=1004254&r2=1004255&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/repository/RepositoryHistoryManager.java (original)
+++ incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/repository/RepositoryHistoryManager.java Mon Oct 4 14:32:19 2010
@@ -49,7 +49,7 @@ public class RepositoryHistoryManager ex
*@param database is the database instance.
*/
public RepositoryHistoryManager(IThreadContext tc, IDBInterface database)
- throws ACFException
+ throws ManifoldCFException
{
super(database,"repohistory");
this.threadContext = tc;
@@ -60,7 +60,7 @@ public class RepositoryHistoryManager ex
*@param parentField is the parent field.
*/
public void install(String parentTable, String parentField)
- throws ACFException
+ throws ManifoldCFException
{
// Always have an outer loop, in case of upgrade
while (true)
@@ -137,7 +137,7 @@ public class RepositoryHistoryManager ex
/** Uninstall the table.
*/
public void deinstall()
- throws ACFException
+ throws ManifoldCFException
{
performDrop(null);
}
@@ -147,7 +147,7 @@ public class RepositoryHistoryManager ex
*@param invKeys are the invalidation keys.
*/
public void deleteOwner(String owner, StringSet invKeys)
- throws ACFException
+ throws ManifoldCFException
{
ArrayList params = new ArrayList();
params.add(owner);
@@ -158,7 +158,7 @@ public class RepositoryHistoryManager ex
*/
public Long addRow(String connectionName, long startTime, long endTime, long dataSize, String activityType,
String entityIdentifier, String resultCode, String resultDescription)
- throws ACFException
+ throws ManifoldCFException
{
Long id = new Long(IDFactory.make(threadContext));
HashMap map = new HashMap();
@@ -254,7 +254,7 @@ public class RepositoryHistoryManager ex
* The resultset returned should have the following columns: "activity","starttime","elapsedtime","resultcode","resultdesc","bytes","identifier".
*/
public IResultSet simpleReport(String connectionName, FilterCriteria criteria, SortOrder sort, int startRow, int maxRowCount)
- throws ACFException
+ throws ManifoldCFException
{
// Build the query.
StringBuffer sb = new StringBuffer("SELECT ");
@@ -278,14 +278,14 @@ public class RepositoryHistoryManager ex
*@return the number of rows included by the criteria.
*/
public long countHistoryRows(String connectionName, FilterCriteria criteria)
- throws ACFException
+ throws ManifoldCFException
{
StringBuffer sb = new StringBuffer("SELECT COUNT(*) AS countcol FROM ");
sb.append(getTableName());
addCriteria(sb,"",connectionName,criteria,false);
IResultSet set = performQuery(sb.toString(),null,null,null);
if (set.getRowCount() < 1)
- throw new ACFException("Expected at least one row");
+ throw new ManifoldCFException("Expected at least one row");
IResultRow row = set.getRow(0);
Long value = new Long(row.getValue("countcol").toString());
return value.longValue();
@@ -298,7 +298,7 @@ public class RepositoryHistoryManager ex
*/
public IResultSet maxActivityCountReport(String connectionName, FilterCriteria filterCriteria, SortOrder sort, BucketDescription idBucket,
long interval, int startRow, int maxRowCount)
- throws ACFException
+ throws ManifoldCFException
{
// The query we will generate here looks like this:
// SELECT *
@@ -403,7 +403,7 @@ public class RepositoryHistoryManager ex
*/
public IResultSet maxByteCountReport(String connectionName, FilterCriteria filterCriteria, SortOrder sort, BucketDescription idBucket,
long interval, int startRow, int maxRowCount)
- throws ACFException
+ throws ManifoldCFException
{
// The query we will generate here looks like this:
// SELECT *
@@ -508,7 +508,7 @@ public class RepositoryHistoryManager ex
*/
public IResultSet resultCodesReport(String connectionName, FilterCriteria filterCriteria, SortOrder sort,
BucketDescription resultCodeBucket, BucketDescription idBucket, int startRow, int maxRowCount)
- throws ACFException
+ throws ManifoldCFException
{
// The query we'll use here will be:
//
@@ -674,7 +674,7 @@ public class RepositoryHistoryManager ex
/** Conditionally do analyze operation.
*/
protected void conditionallyAnalyzeInsert()
- throws ACFException
+ throws ManifoldCFException
{
synchronized (tracker)
{
Modified: incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/repository/ThrottleSpecManager.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/repository/ThrottleSpecManager.java?rev=1004255&r1=1004254&r2=1004255&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/repository/ThrottleSpecManager.java (original)
+++ incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/repository/ThrottleSpecManager.java Mon Oct 4 14:32:19 2010
@@ -41,7 +41,7 @@ public class ThrottleSpecManager extends
*@param database is the database instance.
*/
public ThrottleSpecManager(IDBInterface database)
- throws ACFException
+ throws ManifoldCFException
{
super(database,"throttlespec");
}
@@ -51,7 +51,7 @@ public class ThrottleSpecManager extends
*@param owningTablePrimaryKey is the primary key of the owning table.
*/
public void install(String ownerTable, String owningTablePrimaryKey)
- throws ACFException
+ throws ManifoldCFException
{
// Always use a loop, in case upgrade needs it.
while (true)
@@ -111,7 +111,7 @@ public class ThrottleSpecManager extends
/** Uninstall.
*/
public void deinstall()
- throws ACFException
+ throws ManifoldCFException
{
performDrop(null);
}
@@ -121,7 +121,7 @@ public class ThrottleSpecManager extends
*@return a list, with columns: "description", "match", and "value".
*/
public IResultSet readRows(String name)
- throws ACFException
+ throws ManifoldCFException
{
ArrayList list = new ArrayList();
list.add(name);
@@ -136,7 +136,7 @@ public class ThrottleSpecManager extends
*@param ownerNameParams is the corresponding set of connection name parameters.
*/
public void getRows(IRepositoryConnection[] connections, Map indexMap, String ownerNameList, ArrayList ownerNameParams)
- throws ACFException
+ throws ManifoldCFException
{
IResultSet set = performQuery("SELECT * FROM "+getTableName()+" WHERE "+ownerNameField+" IN ("+ownerNameList+")",ownerNameParams,
null,null);
@@ -159,7 +159,7 @@ public class ThrottleSpecManager extends
*@param connection is the connection to write throttle specs for.
*/
public void writeRows(String owner, IRepositoryConnection connection)
- throws ACFException
+ throws ManifoldCFException
{
beginTransaction();
try
@@ -181,7 +181,7 @@ public class ThrottleSpecManager extends
performInsert(map,null);
}
}
- catch (ACFException e)
+ catch (ManifoldCFException e)
{
signalRollback();
throw e;
@@ -201,7 +201,7 @@ public class ThrottleSpecManager extends
*@param owner is the owner whose rows to delete.
*/
public void deleteRows(String owner)
- throws ACFException
+ throws ManifoldCFException
{
ArrayList list = new ArrayList();
list.add(owner);
Modified: incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/CrawlerAgent.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/CrawlerAgent.java?rev=1004255&r1=1004254&r2=1004255&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/CrawlerAgent.java (original)
+++ incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/CrawlerAgent.java Mon Oct 4 14:32:19 2010
@@ -34,7 +34,7 @@ public class CrawlerAgent implements IAg
*@param threadContext is the thread context.
*/
public CrawlerAgent(IThreadContext threadContext)
- throws ACFException
+ throws ManifoldCFException
{
this.threadContext = threadContext;
}
@@ -42,38 +42,38 @@ public class CrawlerAgent implements IAg
/** Install agent. This usually installs the agent's database tables etc.
*/
public void install()
- throws ACFException
+ throws ManifoldCFException
{
// Install the system tables for the crawler.
- ACF.initializeEnvironment();
- ACF.installSystemTables(threadContext);
+ ManifoldCF.initializeEnvironment();
+ ManifoldCF.installSystemTables(threadContext);
}
/** Uninstall agent. This must clean up everything the agent is responsible for.
*/
public void deinstall()
- throws ACFException
+ throws ManifoldCFException
{
- ACF.initializeEnvironment();
- ACF.deinstallSystemTables(threadContext);
+ ManifoldCF.initializeEnvironment();
+ ManifoldCF.deinstallSystemTables(threadContext);
}
/** Start the agent. This method should spin up the agent threads, and
* then return.
*/
public void startAgent()
- throws ACFException
+ throws ManifoldCFException
{
- ACF.initializeEnvironment();
- ACF.startSystem(threadContext);
+ ManifoldCF.initializeEnvironment();
+ ManifoldCF.startSystem(threadContext);
}
/** Stop the agent. This should shut down the agent threads.
*/
public void stopAgent()
- throws ACFException
+ throws ManifoldCFException
{
- ACF.stopSystem(threadContext);
+ ManifoldCF.stopSystem(threadContext);
}
/** Request permission from agent to delete an output connection.
@@ -81,36 +81,36 @@ public class CrawlerAgent implements IAg
*@return true if the connection is in use, false otherwise.
*/
public boolean isOutputConnectionInUse(String connName)
- throws ACFException
+ throws ManifoldCFException
{
- return ACF.isOutputConnectionInUse(threadContext,connName);
+ return ManifoldCF.isOutputConnectionInUse(threadContext,connName);
}
/** Note the deregistration of a set of output connections.
*@param connectionNames are the names of the connections being deregistered.
*/
public void noteOutputConnectorDeregistration(String[] connectionNames)
- throws ACFException
+ throws ManifoldCFException
{
- ACF.noteOutputConnectorDeregistration(threadContext,connectionNames);
+ ManifoldCF.noteOutputConnectorDeregistration(threadContext,connectionNames);
}
/** Note the registration of a set of output connections.
*@param connectionNames are the names of the connections being registered.
*/
public void noteOutputConnectorRegistration(String[] connectionNames)
- throws ACFException
+ throws ManifoldCFException
{
- ACF.noteOutputConnectorRegistration(threadContext,connectionNames);
+ ManifoldCF.noteOutputConnectorRegistration(threadContext,connectionNames);
}
/** Note a change in configuration for an output connection.
*@param connectionName is the name of the connections being changed.
*/
public void noteOutputConnectionChange(String connectionName)
- throws ACFException
+ throws ManifoldCFException
{
- ACF.noteOutputConnectionChange(threadContext,connectionName);
+ ManifoldCF.noteOutputConnectionChange(threadContext,connectionName);
}
/** Signal that an output connection needs to be "redone". This means that all documents sent to that output connection must be sent again,
@@ -118,9 +118,9 @@ public class CrawlerAgent implements IAg
*@param connectionName is the name of the connection being signalled.
*/
public void signalOutputConnectionRedo(String connectionName)
- throws ACFException
+ throws ManifoldCFException
{
- ACF.signalOutputConnectionRedo(threadContext,connectionName);
+ ManifoldCF.signalOutputConnectionRedo(threadContext,connectionName);
}
}
Modified: incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/DocDeleteResetManager.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/DocDeleteResetManager.java?rev=1004255&r1=1004254&r2=1004255&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/DocDeleteResetManager.java (original)
+++ incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/DocDeleteResetManager.java Mon Oct 4 14:32:19 2010
@@ -42,7 +42,7 @@ public class DocDeleteResetManager exten
/** Reset */
protected void performResetLogic(IThreadContext tc)
- throws ACFException
+ throws ManifoldCFException
{
IJobManager jobManager = JobManagerFactory.make(tc);
jobManager.resetDocDeleteWorkerStatus();
Modified: incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/DocumentDeleteStufferThread.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/DocumentDeleteStufferThread.java?rev=1004255&r1=1004254&r2=1004255&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/DocumentDeleteStufferThread.java (original)
+++ incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/DocumentDeleteStufferThread.java Mon Oct 4 14:32:19 2010
@@ -48,7 +48,7 @@ public class DocumentDeleteStufferThread
*@param n is the maximum number of threads that will be doing delete processing.
*/
public DocumentDeleteStufferThread(DocumentDeleteQueue documentDeleteQueue, int n, DocDeleteResetManager resetManager)
- throws ACFException
+ throws ManifoldCFException
{
super();
this.documentDeleteQueue = documentDeleteQueue;
@@ -72,9 +72,9 @@ public class DocumentDeleteStufferThread
ArrayList docList = new ArrayList();
IDBInterface database = DBInterfaceFactory.make(threadContext,
- ACF.getMasterDatabaseName(),
- ACF.getMasterDatabaseUsername(),
- ACF.getMasterDatabasePassword());
+ ManifoldCF.getMasterDatabaseName(),
+ ManifoldCF.getMasterDatabaseUsername(),
+ ManifoldCF.getMasterDatabasePassword());
int deleteChunkSize = database.getMaxInClause();
@@ -90,7 +90,7 @@ public class DocumentDeleteStufferThread
// can run out of work if we don't act).
if (documentDeleteQueue.checkIfEmpty(n) == false)
{
- ACF.sleep(100L);
+ ManifoldCF.sleep(100L);
continue;
}
@@ -107,7 +107,7 @@ public class DocumentDeleteStufferThread
if (descs.length == 0)
{
Logging.threads.debug("Document delete stuffer thread found nothing to do");
- ACF.sleep(1000L); // 1 second
+ ManifoldCF.sleep(1000L); // 1 second
continue;
}
@@ -128,12 +128,12 @@ public class DocumentDeleteStufferThread
// If we don't wait here, the other threads don't have a chance to queue anything else up.
yield();
}
- catch (ACFException e)
+ catch (ManifoldCFException e)
{
- if (e.getErrorCode() == ACFException.INTERRUPTED)
+ if (e.getErrorCode() == ManifoldCFException.INTERRUPTED)
break;
- if (e.getErrorCode() == ACFException.DATABASE_CONNECTION_ERROR)
+ if (e.getErrorCode() == ManifoldCFException.DATABASE_CONNECTION_ERROR)
{
resetManager.noteEvent();
documentDeleteQueue.reset();
@@ -142,7 +142,7 @@ public class DocumentDeleteStufferThread
try
{
// Give the database a chance to catch up/wake up
- ACF.sleep(10000L);
+ ManifoldCF.sleep(10000L);
}
catch (InterruptedException se)
{
@@ -154,7 +154,7 @@ public class DocumentDeleteStufferThread
// Log it, but keep the thread alive
Logging.threads.error("Exception tossed: "+e.getMessage(),e);
- if (e.getErrorCode() == ACFException.SETUP_ERROR)
+ if (e.getErrorCode() == ManifoldCFException.SETUP_ERROR)
{
// Shut the whole system down!
System.exit(1);
Modified: incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/DocumentDeleteThread.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/DocumentDeleteThread.java?rev=1004255&r1=1004254&r2=1004255&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/DocumentDeleteThread.java (original)
+++ incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/DocumentDeleteThread.java Mon Oct 4 14:32:19 2010
@@ -54,7 +54,7 @@ public class DocumentDeleteThread extend
*@param id is the worker thread id.
*/
public DocumentDeleteThread(String id, DocumentDeleteQueue documentDeleteQueue, DocDeleteResetManager resetManager)
- throws ACFException
+ throws ManifoldCFException
{
super();
this.id = id;
@@ -187,7 +187,7 @@ public class DocumentDeleteThread extend
long waittime = amt-now;
if (waittime <= 0L)
waittime = 300000L;
- ACF.sleep(waittime);
+ ManifoldCF.sleep(waittime);
}
}
@@ -233,12 +233,12 @@ public class DocumentDeleteThread extend
}
}
}
- catch (ACFException e)
+ catch (ManifoldCFException e)
{
- if (e.getErrorCode() == ACFException.INTERRUPTED)
+ if (e.getErrorCode() == ManifoldCFException.INTERRUPTED)
break;
- if (e.getErrorCode() == ACFException.DATABASE_CONNECTION_ERROR)
+ if (e.getErrorCode() == ManifoldCFException.DATABASE_CONNECTION_ERROR)
{
resetManager.noteEvent();
documentDeleteQueue.reset();
@@ -247,7 +247,7 @@ public class DocumentDeleteThread extend
try
{
// Give the database a chance to catch up/wake up
- ACF.sleep(10000L);
+ ManifoldCF.sleep(10000L);
}
catch (InterruptedException se)
{
@@ -259,7 +259,7 @@ public class DocumentDeleteThread extend
// Log it, but keep the thread alive
Logging.threads.error("Exception tossed: "+e.getMessage(),e);
- if (e.getErrorCode() == ACFException.SETUP_ERROR)
+ if (e.getErrorCode() == ManifoldCFException.SETUP_ERROR)
{
// Shut the whole system down!
System.exit(1);
@@ -328,9 +328,9 @@ public class DocumentDeleteThread extend
*/
public void recordActivity(Long startTime, String activityType, Long dataSize,
String entityURI, String resultCode, String resultDescription)
- throws ACFException
+ throws ManifoldCFException
{
- connMgr.recordHistory(connectionName,startTime,ACF.qualifyOutputActivityName(activityType,outputConnectionName),dataSize,entityURI,resultCode,
+ connMgr.recordHistory(connectionName,startTime,ManifoldCF.qualifyOutputActivityName(activityType,outputConnectionName),dataSize,entityURI,resultCode,
resultDescription,null);
}
}
Modified: incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ExpireStufferThread.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ExpireStufferThread.java?rev=1004255&r1=1004254&r2=1004255&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ExpireStufferThread.java (original)
+++ incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ExpireStufferThread.java Mon Oct 4 14:32:19 2010
@@ -46,7 +46,7 @@ public class ExpireStufferThread extends
* number of documents to be done at once!
*/
public ExpireStufferThread(DocumentDeleteQueue documentQueue, int n, WorkerResetManager resetManager)
- throws ACFException
+ throws ManifoldCFException
{
super();
this.documentQueue = documentQueue;
@@ -82,9 +82,9 @@ public class ExpireStufferThread extends
HashMap jobDescriptionMap = new HashMap();
IDBInterface database = DBInterfaceFactory.make(threadContext,
- ACF.getMasterDatabaseName(),
- ACF.getMasterDatabaseUsername(),
- ACF.getMasterDatabasePassword());
+ ManifoldCF.getMasterDatabaseName(),
+ ManifoldCF.getMasterDatabaseUsername(),
+ ManifoldCF.getMasterDatabasePassword());
int deleteChunkSize = database.getMaxInClause();
@@ -95,7 +95,7 @@ public class ExpireStufferThread extends
try
{
if (Thread.currentThread().isInterrupted())
- throw new ACFException("Interrupted",ACFException.INTERRUPTED);
+ throw new ManifoldCFException("Interrupted",ManifoldCFException.INTERRUPTED);
// Check if we're okay
resetManager.waitForReset(threadContext);
@@ -118,7 +118,7 @@ public class ExpireStufferThread extends
DocumentDescription[] descs = jobManager.getExpiredDocuments(deleteChunkSize,currentTime);
if (Thread.currentThread().isInterrupted())
- throw new ACFException("Interrupted",ACFException.INTERRUPTED);
+ throw new ManifoldCFException("Interrupted",ManifoldCFException.INTERRUPTED);
if (Logging.threads.isDebugEnabled())
{
@@ -129,7 +129,7 @@ public class ExpireStufferThread extends
// The theory is that we need to allow stuff to accumulate.
if (descs.length == 0)
{
- ACF.sleep(60000L); // 1 minute
+ ManifoldCF.sleep(60000L); // 1 minute
continue;
}
@@ -145,14 +145,14 @@ public class ExpireStufferThread extends
documentQueue.addDocuments(set);
// If we don't wait here, the other threads don't seem to have a chance to queue anything else up.
- ACF.sleep(1000L);
+ ManifoldCF.sleep(1000L);
}
- catch (ACFException e)
+ catch (ManifoldCFException e)
{
- if (e.getErrorCode() == ACFException.INTERRUPTED)
+ if (e.getErrorCode() == ManifoldCFException.INTERRUPTED)
break;
- if (e.getErrorCode() == ACFException.DATABASE_CONNECTION_ERROR)
+ if (e.getErrorCode() == ManifoldCFException.DATABASE_CONNECTION_ERROR)
{
resetManager.noteEvent();
documentQueue.reset();
@@ -161,7 +161,7 @@ public class ExpireStufferThread extends
try
{
// Give the database a chance to catch up/wake up
- ACF.sleep(10000L);
+ ManifoldCF.sleep(10000L);
}
catch (InterruptedException se)
{
@@ -173,7 +173,7 @@ public class ExpireStufferThread extends
// Log it, but keep the thread alive
Logging.threads.error("Exception tossed: "+e.getMessage(),e);
- if (e.getErrorCode() == ACFException.SETUP_ERROR)
+ if (e.getErrorCode() == ManifoldCFException.SETUP_ERROR)
{
System.exit(1);
}
Modified: incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ExpireThread.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ExpireThread.java?rev=1004255&r1=1004254&r2=1004255&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ExpireThread.java (original)
+++ incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ExpireThread.java Mon Oct 4 14:32:19 2010
@@ -45,7 +45,7 @@ public class ExpireThread extends Thread
*@param id is the expire thread id.
*/
public ExpireThread(String id, DocumentDeleteQueue documentQueue, QueueTracker queueTracker, WorkerResetManager resetManager)
- throws ACFException
+ throws ManifoldCFException
{
super();
this.id = id;
@@ -77,7 +77,7 @@ public class ExpireThread extends Thread
try
{
if (Thread.currentThread().isInterrupted())
- throw new ACFException("Interrupted",ACFException.INTERRUPTED);
+ throw new ManifoldCFException("Interrupted",ManifoldCFException.INTERRUPTED);
// Before we begin, conditionally reset
resetManager.waitForReset(threadContext);
@@ -92,7 +92,7 @@ public class ExpireThread extends Thread
continue;
if (Thread.currentThread().isInterrupted())
- throw new ACFException("Interrupted",ACFException.INTERRUPTED);
+ throw new ManifoldCFException("Interrupted",ManifoldCFException.INTERRUPTED);
try
{
@@ -223,7 +223,7 @@ public class ExpireThread extends Thread
long waittime = amt-now;
if (waittime <= 0L)
waittime = 300000L;
- ACF.sleep(waittime);
+ ManifoldCF.sleep(waittime);
}
}
@@ -242,7 +242,7 @@ public class ExpireThread extends Thread
String[] legalLinkTypes = (String[])arrayRelationshipTypes.get(index);
DocumentDescription[] requeueCandidates = jobManager.markDocumentDeleted(jobID,legalLinkTypes,ddd,hopcountMethod);
// Use the common method for doing the requeuing
- ACF.requeueDocumentsDueToCarrydown(jobManager,requeueCandidates,
+ ManifoldCF.requeueDocumentsDueToCarrydown(jobManager,requeueCandidates,
connector,connection,queueTracker,currentTime);
// Finally, completed expiration of the document.
dqd.setProcessed();
@@ -256,9 +256,9 @@ public class ExpireThread extends Thread
RepositoryConnectorFactory.release(connector);
}
}
- catch (ACFException e)
+ catch (ManifoldCFException e)
{
- if (e.getErrorCode() == ACFException.REPOSITORY_CONNECTION_ERROR)
+ if (e.getErrorCode() == ManifoldCFException.REPOSITORY_CONNECTION_ERROR)
{
// This error can only come from grabbing the connections. So, if this occurs it means that
// all the documents we've been handed have to be stuffed back onto the queue for processing at a later time.
@@ -271,12 +271,12 @@ public class ExpireThread extends Thread
}
}
}
- catch (ACFException e)
+ catch (ManifoldCFException e)
{
- if (e.getErrorCode() == ACFException.INTERRUPTED)
+ if (e.getErrorCode() == ManifoldCFException.INTERRUPTED)
break;
- if (e.getErrorCode() == ACFException.DATABASE_CONNECTION_ERROR)
+ if (e.getErrorCode() == ManifoldCFException.DATABASE_CONNECTION_ERROR)
throw e;
Logging.threads.error("Exception tossed: "+e.getMessage(),e);
@@ -299,12 +299,12 @@ public class ExpireThread extends Thread
}
}
}
- catch (ACFException e)
+ catch (ManifoldCFException e)
{
- if (e.getErrorCode() == ACFException.INTERRUPTED)
+ if (e.getErrorCode() == ManifoldCFException.INTERRUPTED)
break;
- if (e.getErrorCode() == ACFException.DATABASE_CONNECTION_ERROR)
+ if (e.getErrorCode() == ManifoldCFException.DATABASE_CONNECTION_ERROR)
{
// Note the failure, which will cause a reset to occur
resetManager.noteEvent();
@@ -315,7 +315,7 @@ public class ExpireThread extends Thread
try
{
// Give the database a chance to catch up/wake up
- ACF.sleep(10000L);
+ ManifoldCF.sleep(10000L);
}
catch (InterruptedException se)
{
@@ -393,9 +393,9 @@ public class ExpireThread extends Thread
*/
public void recordActivity(Long startTime, String activityType, Long dataSize,
String entityURI, String resultCode, String resultDescription)
- throws ACFException
+ throws ManifoldCFException
{
- connMgr.recordHistory(connectionName,startTime,ACF.qualifyOutputActivityName(activityType,outputConnectionName),dataSize,entityURI,resultCode,
+ connMgr.recordHistory(connectionName,startTime,ManifoldCF.qualifyOutputActivityName(activityType,outputConnectionName),dataSize,entityURI,resultCode,
resultDescription,null);
}
}
Modified: incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/FinisherThread.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/FinisherThread.java?rev=1004255&r1=1004254&r2=1004255&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/FinisherThread.java (original)
+++ incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/FinisherThread.java Mon Oct 4 14:32:19 2010
@@ -36,7 +36,7 @@ public class FinisherThread extends Thre
/** Constructor.
*/
public FinisherThread()
- throws ACFException
+ throws ManifoldCFException
{
super();
setName("Finisher thread");
@@ -63,20 +63,20 @@ public class FinisherThread extends Thre
// See if there are any completed jobs
jobManager.finishJobs();
Logging.threads.debug("Done cleaning up completed jobs");
- ACF.sleep(10000L);
+ ManifoldCF.sleep(10000L);
}
- catch (ACFException e)
+ catch (ManifoldCFException e)
{
- if (e.getErrorCode() == ACFException.INTERRUPTED)
+ if (e.getErrorCode() == ManifoldCFException.INTERRUPTED)
break;
- if (e.getErrorCode() == ACFException.DATABASE_CONNECTION_ERROR)
+ if (e.getErrorCode() == ManifoldCFException.DATABASE_CONNECTION_ERROR)
{
Logging.threads.error("Finisher thread aborting and restarting due to database connection reset: "+e.getMessage(),e);
try
{
// Give the database a chance to catch up/wake up
- ACF.sleep(10000L);
+ ManifoldCF.sleep(10000L);
}
catch (InterruptedException se)
{
@@ -88,7 +88,7 @@ public class FinisherThread extends Thre
// Log it, but keep the thread alive
Logging.threads.error("Exception tossed: "+e.getMessage(),e);
- if (e.getErrorCode() == ACFException.SETUP_ERROR)
+ if (e.getErrorCode() == ManifoldCFException.SETUP_ERROR)
{
// Shut the whole system down!
System.exit(1);