Class Jobs
- java.lang.Object
-
- org.apache.manifoldcf.core.database.BaseTable
-
- org.apache.manifoldcf.crawler.jobs.Jobs
-
public class Jobs extends BaseTable
This class manages the jobs table.
jobsField Type Description id BIGINT Primary Key description VARCHAR(255) status CHAR(1) operational field lasttime BIGINT operational field starttime BIGINT operational field lastchecktime BIGINT operational field seedingversion LONGTEXT operational field endtime BIGINT operational field docspec LONGTEXT connectionname VARCHAR(32) Reference:repoconnections.connectionname type CHAR(1) intervaltime BIGINT maxintervaltime BIGINT expirationtime BIGINT windowend BIGINT priority BIGINT startmethod CHAR(1) errortext LONGTEXT reseedinterval BIGINT reseedtime BIGINT hopcountmode CHAR(1) processid VARCHAR(16) failtime BIGINT failcount BIGINT assessmentstate CHAR(1)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
Jobs.JobObjectDescription
Job object description class.protected static class
Jobs.JobObjectExecutor
This is the executor object for locating job objects.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
_rcsid
static int
ASSESSMENT_KNOWN
static int
ASSESSMENT_UNKNOWN
protected static java.util.Map<java.lang.String,java.lang.Integer>
assessmentMap
static java.lang.String
assessmentStateField
Set to N when the job needs connector-installed assessmentprotected ICacheManager
cacheManager
protected IRepositoryConnectionManager
connectionMgr
static java.lang.String
connectionNameField
static java.lang.String
descriptionField
static java.lang.String
documentSpecField
static java.lang.String
endTimeField
If inactive, the end time of the LAST session, if any.static java.lang.String
errorField
If non-null, this is the last error that occurred (which aborted the last task, either running the job or doing the delete cleanup).static java.lang.String
expirationField
This is the expiration time of documents for a given job (in ms.)static java.lang.String
failCountField
When non-null, indicates the number of retries remaining, after which the attempt will be considered to have actually failedstatic java.lang.String
failTimeField
When non-null, indicates the time that, when a ServiceInterruption occurs, the attempt will be considered to have actually failedprotected int
FETCH_MAX
static int
HOPCOUNT_ACCURATE
static int
HOPCOUNT_NEVERDELETE
static int
HOPCOUNT_NODELETE
static java.lang.String
hopcountModeField
For a job whose connector supports hopcounts, this describes how those hopcounts are handled.protected HopFilterManager
hopFilterManager
protected static java.util.Map<java.lang.String,java.lang.Integer>
hopmodeMap
static java.lang.String
idField
static java.lang.String
intervalField
This is the minimum reschedule interval for a document being crawled adaptively (in ms.)protected static java.lang.String
jobsLock
static java.lang.String
lastTimeField
The last time this job was assessed, in ms.protected ILockManager
lockManager
static java.lang.String
maxIntervalField
This is the maximum reschedule interval for a document being crawled adaptively (in ms.)protected NotificationManager
notificationManager
protected IOutputConnectionManager
outputMgr
protected PipelineManager
pipelineManager
static java.lang.String
priorityField
This is the job's priority vs.static java.lang.String
processIDField
Process id field, for keeping track of which process owns transient statestatic java.lang.String
reseedIntervalField
If this is an adaptive job, what should the reseed interval be (in milliseconds)static java.lang.String
reseedTimeField
For an adaptive job, this is the next time to reseed the job.protected ScheduleManager
scheduleManager
static java.lang.String
seedingVersionField
This text data represents the seeding version string, which for many connectors is simply the last time seeding was donestatic int
START_DISABLE
static int
START_WINDOWBEGIN
static int
START_WINDOWINSIDE
protected static java.util.Map<java.lang.String,java.lang.Integer>
startMap
static java.lang.String
startMethodField
How/when to start the jobstatic java.lang.String
startTimeField
If active, paused, activewait, or pausedwait, the start time of the current session, else null.static int
STATUS_ABORTING
static int
STATUS_ABORTINGFORRESTART
static int
STATUS_ABORTINGFORRESTARTMINIMAL
static int
STATUS_ABORTINGFORRESTARTSEEDING
static int
STATUS_ABORTINGFORRESTARTSEEDINGMINIMAL
static int
STATUS_ABORTINGSHUTTINGDOWN
static int
STATUS_ABORTINGSTARTINGUPFORRESTART
static int
STATUS_ABORTINGSTARTINGUPFORRESTARTMINIMAL
static int
STATUS_ACTIVE
static int
STATUS_ACTIVE_NEITHER
static int
STATUS_ACTIVE_NOOUTPUT
static int
STATUS_ACTIVE_UNINSTALLED
static int
STATUS_ACTIVESEEDING
static int
STATUS_ACTIVESEEDING_NEITHER
static int
STATUS_ACTIVESEEDING_NOOUTPUT
static int
STATUS_ACTIVESEEDING_UNINSTALLED
static int
STATUS_ACTIVEWAIT
static int
STATUS_ACTIVEWAITING
static int
STATUS_ACTIVEWAITINGSEEDING
static int
STATUS_ACTIVEWAITSEEDING
static int
STATUS_DELETESTARTINGUP
static int
STATUS_DELETING
static int
STATUS_DELETING_NOOUTPUT
static int
STATUS_INACTIVE
static int
STATUS_NOTIFYINGOFCOMPLETION
static int
STATUS_NOTIFYINGOFDELETION
static int
STATUS_PAUSED
static int
STATUS_PAUSEDSEEDING
static int
STATUS_PAUSEDWAIT
static int
STATUS_PAUSEDWAITSEEDING
static int
STATUS_PAUSING
static int
STATUS_PAUSINGSEEDING
static int
STATUS_PAUSINGWAITING
static int
STATUS_PAUSINGWAITINGSEEDING
static int
STATUS_READYFORDELETE
static int
STATUS_READYFORDELETENOTIFY
static int
STATUS_READYFORNOTIFY
static int
STATUS_READYFORSTARTUP
static int
STATUS_READYFORSTARTUPMINIMAL
static int
STATUS_RESUMING
static int
STATUS_RESUMINGSEEDING
static int
STATUS_SHUTTINGDOWN
static int
STATUS_STARTINGUP
static int
STATUS_STARTINGUPMINIMAL
static java.lang.String
statusField
Status of this job.protected static java.util.Map<java.lang.String,java.lang.Integer>
statusMap
protected IThreadContext
threadContext
protected ITransformationConnectionManager
transMgr
static int
TYPE_CONTINUOUS
static int
TYPE_SPECIFIED
static java.lang.String
typeField
protected static java.util.Map<java.lang.String,java.lang.Integer>
typeMap
static java.lang.String
windowEndField
If non-null, this is the time that the current execution window closes, in ms since epoch.-
Fields inherited from class org.apache.manifoldcf.core.database.BaseTable
dbInterface, tableName
-
-
Constructor Summary
Constructors Constructor Description Jobs(IThreadContext threadContext, IDBInterface database)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
abortJob(java.lang.Long jobID, java.lang.String errorText)
Abort a job.void
abortRestartJob(java.lang.Long jobID, boolean requestMinimum)
Restart a job.boolean
activeJobsPresent()
Return true if there is a job in either the ACTIVE or the ACTIVESEEDING state.void
analyzeTables()
Analyze job tables that need analysis.void
assessMarkedJobs()
Assess all marked jobs to determine if they can be reactivated.static java.lang.String
assessmentStateToString(int value)
Go from assessment state to string.boolean
checkIfNotificationReference(java.lang.String connectionName)
See if there's a reference to a notification connection name.boolean
checkIfOutputReference(java.lang.String connectionName)
See if there's a reference to an output connection name.boolean
checkIfReference(java.lang.String connectionName)
See if there's a reference to a connection name.boolean
checkIfTransformationReference(java.lang.String connectionName)
See if there's a reference to a transformation connection name.boolean
checkJobActive(java.lang.Long jobID)
Check whether a job's status indicates that it is in ACTIVE or ACTIVESEEDING state.protected boolean
checkOutputsInstalled(java.lang.String[] outputNames)
protected boolean
checkTransformationsInstalled(java.lang.String[] transformationNames)
boolean
cleaningJobsPresent()
Return true if there is a job in the SHUTTINGDOWN state.void
clearSeedingState(java.lang.Long jobID)
Clear seeding state for a job.IJobDescription
create()
Create a job.void
deinstall()
Uninstall.void
delete(java.lang.Long id)
Delete a job.boolean
deletingJobsPresent()
Return true if there is a job in the DELETING state.static java.lang.String
enumeratedValueToString(EnumeratedValues values)
Go from enumerated value to string.IJobDescription[]
findJobsForConnection(java.lang.String connectionName)
Get the job IDs associated with a given connection name.java.lang.Long[]
findJobsMatchingNotifications(java.util.List<java.lang.String> notificationConnectionNames)
Find a list of jobs matching specified notification names.java.lang.Long[]
findJobsMatchingOutputs(java.util.List<java.lang.String> outputConnectionNames)
Find a list of jobs matching specified output names.java.lang.Long[]
findJobsMatchingTransformations(java.util.List<java.lang.String> transformationConnectionNames)
Find a list of jobs matching specified transformation names.void
finishJob(java.lang.Long jobID, long finishTime)
Finish a job.void
finishJobCleanup(java.lang.Long jobID)
Finish job cleanup.void
finishResumeJob(java.lang.Long jobID, long currentTime)
Resume a stopped job (from a pause or activewait).void
finishStopJob(java.lang.Long jobID, long currentTime)
Stop a job suddenly (abort, pause, activewait).java.lang.String[]
getActiveConnectionNames()
Get unique connection names for all active jobs.IResultSet
getActiveJobConnections()
Get a list of active job identifiers and their associated connection names.IJobDescription[]
getAll()
Get a list of all jobs which are not in the process of being deleted already.int
getAnalyzeTime()
Come up with a maximum time (in minutes) for re-analyzing tables.protected static java.lang.String
getJobIDKey(java.lang.Long jobID)
protected void
getJobsChunk(java.util.Map<java.lang.Long,JobDescription> returnValues, java.lang.String idList, java.util.ArrayList params)
Read a chunk of repository connections.protected static java.lang.String
getJobsKey()
protected JobDescription[]
getJobsMultiple(java.lang.Long[] ids)
Get multiple jobs (without caching)protected static java.lang.String
getJobStatusKey()
boolean
hasPriorityJobs(int priority)
Are there any jobs that have a specified priority levelstatic java.lang.String
hopcountModeToString(int value)
Go from hopcount mode to string.void
install(java.lang.String transTableName, java.lang.String transNameField, java.lang.String outputTableName, java.lang.String outputNameField, java.lang.String connectionTableName, java.lang.String connectionNameField, java.lang.String notificationConnectionTableName, java.lang.String notificationConnectionNameField)
Install or upgrade this table.void
invalidateCurrentUnregisteredState(java.lang.Long jobID, int oldStatusValue)
Invalidate current state with respect to installed connectors, as a result of registration.IJobDescription
load(java.lang.Long id, boolean readOnly)
Load a job for editing.IJobDescription[]
loadMultiple(java.lang.Long[] ids, boolean[] readOnlies)
Load multiple jobs for editing.protected int
loadMultipleInternal(IJobDescription[] rval, int outputIndex, java.lang.Long[] ids, boolean[] readOnlies, int inputIndex, int length)
void
noteConnectionChange(java.lang.String connectionName)
Note a change in connection configuration.void
noteConnectorDeregistration(java.lang.Long jobID, int oldStatusValue)
Signal to a job that its underlying connector has gone away.void
noteConnectorRegistration(java.lang.Long jobID, int oldStatusValue)
Signal to a job that its underlying connector has returned.void
noteJobDeleteStarted(java.lang.Long jobID, long startTime)
Put job into "deleting" state, and set the start time field.void
noteJobSeeded(java.lang.Long jobID, java.lang.String seedVersionString)
Note job seeded.void
noteJobStarted(java.lang.Long jobID, long startTime, java.lang.String seedVersionString)
Make job active, and set the start time field.void
noteNotificationConnectionChange(java.lang.String connectionName)
Note a change in notification connection configuration.void
noteNotificationConnectorDeregistration(java.lang.Long jobID, int oldStatusValue)
Signal to a job that its underlying notification connector has gone away.void
noteNotificationConnectorRegistration(java.lang.Long jobID, int oldStatusValue)
Signal to a job that its underlying notification connector has returned.void
noteOutputConnectionChange(java.lang.String connectionName)
Note a change in output connection configuration.void
noteOutputConnectorDeregistration(java.lang.Long jobID, int oldStatusValue)
Signal to a job that its underlying output connector has gone away.void
noteOutputConnectorRegistration(java.lang.Long jobID, int oldStatusValue)
Signal to a job that its underlying output connector has returned.void
noteTransformationConnectionChange(java.lang.String connectionName)
Note a change in transformation connection configuration.void
noteTransformationConnectorDeregistration(java.lang.Long jobID, int oldStatusValue)
Signal to a job that an underlying transformation connector has gone away.void
noteTransformationConnectorRegistration(java.lang.Long jobID, int oldStatusValue)
Signal to a job that an underlying transformation connector has been registered.void
notificationComplete(java.lang.Long jobID)
Mark job as having properly notified the output connector of completion.void
pauseJob(java.lang.Long jobID)
Pause a job.ScheduleRecord[][]
readScheduleRecords(java.lang.Long[] jobIDs)
Read schedule records for a specified set of jobs.void
resetDeleteStartupWorkerStatus(java.lang.String processID)
Reset delete startup worker thread status.void
resetNotificationWorkerStatus(java.lang.String processID)
Reset notification worker thread status.void
resetSeedingWorkerStatus(java.lang.String processID)
Reset as part of restoring seeding worker threads.void
resetStartupWorkerStatus(java.lang.String processID)
Reset startup worker thread status.void
restart()
Clean up after all process IDs.void
restart(java.lang.String processID)
This method is called on a restart.void
restartCluster()
void
restartJob(java.lang.Long jobID)
Restart a job.void
retryDeleteNotification(java.lang.Long jobID, long failTime, int failCount)
Retry delete notification.void
retryNotification(java.lang.Long jobID, long failTime, int failCount)
Retry notification.void
retrySeeding(java.lang.Long jobID, long failTime, int failCount)
Retry seeding.void
retryStartup(java.lang.Long jobID, boolean requestMinimum, long failTime, int failCount)
Retry startup.void
returnJobToActive(java.lang.Long jobID)
Put job back into active state, from the shutting-down state.void
save(IJobDescription jobDescription)
Save a job description.void
startJob(java.lang.Long jobID, java.lang.Long windowEnd, boolean requestMinimum)
Write job status and window end, and clear the endtime field.static java.lang.String
startMethodToString(int startMethod)
Get from start method to string.static java.lang.String
statusToString(int status)
Go from status to string.static int
stringToAssessmentState(java.lang.String value)
Go from string to assessment state.static EnumeratedValues
stringToEnumeratedValue(java.lang.String value)
Go from string to enumerated value.static int
stringToHopcountMode(java.lang.String value)
Go from string to hopcount mode.static int
stringToStartMethod(java.lang.String value)
Go from string to start method.static int
stringToStatus(java.lang.String value)
Go from string to status.static int
stringToType(java.lang.String value)
Go from string to type.static java.lang.String
typeToString(int type)
Go from type to string.void
unwaitJob(java.lang.Long jobID, int newStatus, java.lang.Long windowEnd)
Cause job that is in "wait" state to become un-waited.void
updateLastTime(java.lang.Long jobID, long currentTime)
Update a job's last-time field.void
waitJob(java.lang.Long jobID, int newStatus)
Cause job that is in active or paused state to become waited.void
writePermanentStatus(java.lang.Long jobID, int status)
Update a job's status.void
writePermanentStatus(java.lang.Long jobID, int status, boolean clearFailTime)
Update a job's status.void
writePermanentStatus(java.lang.Long jobID, int status, java.lang.Long reseedTime)
Update a job's status, and its reseed time.void
writePermanentStatus(java.lang.Long jobID, int status, java.lang.Long reseedTime, boolean clearFailTime)
Update a job's status, and its reseed time.protected void
writeStatus(java.lang.Long jobID, int status, java.lang.Long reseedTime, java.lang.String processID, boolean clearFailTime)
Update a job's status, and its reseed time.protected void
writeStatus(java.lang.Long jobID, int status, java.lang.String processID, boolean clearFailTime)
Update a job's status.void
writeTransientStatus(java.lang.Long jobID, int status, java.lang.Long reseedTime, java.lang.String processID)
Update a job's status, and its reseed time.void
writeTransientStatus(java.lang.Long jobID, int status, java.lang.String processID)
Update a job's status.-
Methods inherited from class org.apache.manifoldcf.core.database.BaseTable
addTableIndex, analyzeTable, beginTransaction, buildConjunctionClause, constructCountClause, constructDistinctOnClause, constructDoubleCastClause, constructOffsetLimitClause, constructRegexpClause, constructSubstringClause, endTransaction, findConjunctionClauseMax, getDatabaseCacheKey, getDBInterface, getMaxInClause, getMaxOrClause, getSleepAmt, getTableIndexes, getTableName, getTableSchema, getTransactionID, getWindowedReportMaxRows, makeTableKey, noteModifications, performAddIndex, performAlter, performCommit, performCreate, performDelete, performDrop, performInsert, performModification, performQuery, performQuery, performRemoveIndex, performUpdate, prepareRowForSave, readRow, reindexTable, signalRollback, sleepFor
-
-
-
-
Field Detail
-
_rcsid
public static final java.lang.String _rcsid
- See Also:
- Constant Field Values
-
STATUS_INACTIVE
public static final int STATUS_INACTIVE
- See Also:
- Constant Field Values
-
STATUS_ACTIVE
public static final int STATUS_ACTIVE
- See Also:
- Constant Field Values
-
STATUS_ACTIVESEEDING
public static final int STATUS_ACTIVESEEDING
- See Also:
- Constant Field Values
-
STATUS_ACTIVEWAITING
public static final int STATUS_ACTIVEWAITING
- See Also:
- Constant Field Values
-
STATUS_ACTIVEWAITINGSEEDING
public static final int STATUS_ACTIVEWAITINGSEEDING
- See Also:
- Constant Field Values
-
STATUS_ACTIVEWAIT
public static final int STATUS_ACTIVEWAIT
- See Also:
- Constant Field Values
-
STATUS_ACTIVEWAITSEEDING
public static final int STATUS_ACTIVEWAITSEEDING
- See Also:
- Constant Field Values
-
STATUS_PAUSING
public static final int STATUS_PAUSING
- See Also:
- Constant Field Values
-
STATUS_PAUSINGSEEDING
public static final int STATUS_PAUSINGSEEDING
- See Also:
- Constant Field Values
-
STATUS_PAUSINGWAITING
public static final int STATUS_PAUSINGWAITING
- See Also:
- Constant Field Values
-
STATUS_PAUSINGWAITINGSEEDING
public static final int STATUS_PAUSINGWAITINGSEEDING
- See Also:
- Constant Field Values
-
STATUS_PAUSED
public static final int STATUS_PAUSED
- See Also:
- Constant Field Values
-
STATUS_PAUSEDSEEDING
public static final int STATUS_PAUSEDSEEDING
- See Also:
- Constant Field Values
-
STATUS_PAUSEDWAIT
public static final int STATUS_PAUSEDWAIT
- See Also:
- Constant Field Values
-
STATUS_PAUSEDWAITSEEDING
public static final int STATUS_PAUSEDWAITSEEDING
- See Also:
- Constant Field Values
-
STATUS_SHUTTINGDOWN
public static final int STATUS_SHUTTINGDOWN
- See Also:
- Constant Field Values
-
STATUS_RESUMING
public static final int STATUS_RESUMING
- See Also:
- Constant Field Values
-
STATUS_RESUMINGSEEDING
public static final int STATUS_RESUMINGSEEDING
- See Also:
- Constant Field Values
-
STATUS_ABORTING
public static final int STATUS_ABORTING
- See Also:
- Constant Field Values
-
STATUS_STARTINGUP
public static final int STATUS_STARTINGUP
- See Also:
- Constant Field Values
-
STATUS_STARTINGUPMINIMAL
public static final int STATUS_STARTINGUPMINIMAL
- See Also:
- Constant Field Values
-
STATUS_READYFORSTARTUP
public static final int STATUS_READYFORSTARTUP
- See Also:
- Constant Field Values
-
STATUS_READYFORSTARTUPMINIMAL
public static final int STATUS_READYFORSTARTUPMINIMAL
- See Also:
- Constant Field Values
-
STATUS_READYFORDELETE
public static final int STATUS_READYFORDELETE
- See Also:
- Constant Field Values
-
STATUS_ABORTINGFORRESTART
public static final int STATUS_ABORTINGFORRESTART
- See Also:
- Constant Field Values
-
STATUS_ABORTINGFORRESTARTMINIMAL
public static final int STATUS_ABORTINGFORRESTARTMINIMAL
- See Also:
- Constant Field Values
-
STATUS_ABORTINGFORRESTARTSEEDING
public static final int STATUS_ABORTINGFORRESTARTSEEDING
- See Also:
- Constant Field Values
-
STATUS_ABORTINGFORRESTARTSEEDINGMINIMAL
public static final int STATUS_ABORTINGFORRESTARTSEEDINGMINIMAL
- See Also:
- Constant Field Values
-
STATUS_ABORTINGSTARTINGUPFORRESTART
public static final int STATUS_ABORTINGSTARTINGUPFORRESTART
- See Also:
- Constant Field Values
-
STATUS_ABORTINGSTARTINGUPFORRESTARTMINIMAL
public static final int STATUS_ABORTINGSTARTINGUPFORRESTARTMINIMAL
- See Also:
- Constant Field Values
-
STATUS_READYFORNOTIFY
public static final int STATUS_READYFORNOTIFY
- See Also:
- Constant Field Values
-
STATUS_NOTIFYINGOFCOMPLETION
public static final int STATUS_NOTIFYINGOFCOMPLETION
- See Also:
- Constant Field Values
-
STATUS_DELETING
public static final int STATUS_DELETING
- See Also:
- Constant Field Values
-
STATUS_DELETESTARTINGUP
public static final int STATUS_DELETESTARTINGUP
- See Also:
- Constant Field Values
-
STATUS_ABORTINGSHUTTINGDOWN
public static final int STATUS_ABORTINGSHUTTINGDOWN
- See Also:
- Constant Field Values
-
STATUS_READYFORDELETENOTIFY
public static final int STATUS_READYFORDELETENOTIFY
- See Also:
- Constant Field Values
-
STATUS_NOTIFYINGOFDELETION
public static final int STATUS_NOTIFYINGOFDELETION
- See Also:
- Constant Field Values
-
STATUS_ACTIVE_UNINSTALLED
public static final int STATUS_ACTIVE_UNINSTALLED
- See Also:
- Constant Field Values
-
STATUS_ACTIVESEEDING_UNINSTALLED
public static final int STATUS_ACTIVESEEDING_UNINSTALLED
- See Also:
- Constant Field Values
-
STATUS_DELETING_NOOUTPUT
public static final int STATUS_DELETING_NOOUTPUT
- See Also:
- Constant Field Values
-
STATUS_ACTIVE_NOOUTPUT
public static final int STATUS_ACTIVE_NOOUTPUT
- See Also:
- Constant Field Values
-
STATUS_ACTIVESEEDING_NOOUTPUT
public static final int STATUS_ACTIVESEEDING_NOOUTPUT
- See Also:
- Constant Field Values
-
STATUS_ACTIVE_NEITHER
public static final int STATUS_ACTIVE_NEITHER
- See Also:
- Constant Field Values
-
STATUS_ACTIVESEEDING_NEITHER
public static final int STATUS_ACTIVESEEDING_NEITHER
- See Also:
- Constant Field Values
-
ASSESSMENT_KNOWN
public static final int ASSESSMENT_KNOWN
- See Also:
- Constant Field Values
-
ASSESSMENT_UNKNOWN
public static final int ASSESSMENT_UNKNOWN
- See Also:
- Constant Field Values
-
TYPE_CONTINUOUS
public static final int TYPE_CONTINUOUS
- See Also:
- Constant Field Values
-
TYPE_SPECIFIED
public static final int TYPE_SPECIFIED
- See Also:
- Constant Field Values
-
START_WINDOWBEGIN
public static final int START_WINDOWBEGIN
- See Also:
- Constant Field Values
-
START_WINDOWINSIDE
public static final int START_WINDOWINSIDE
- See Also:
- Constant Field Values
-
START_DISABLE
public static final int START_DISABLE
- See Also:
- Constant Field Values
-
HOPCOUNT_ACCURATE
public static final int HOPCOUNT_ACCURATE
- See Also:
- Constant Field Values
-
HOPCOUNT_NODELETE
public static final int HOPCOUNT_NODELETE
- See Also:
- Constant Field Values
-
HOPCOUNT_NEVERDELETE
public static final int HOPCOUNT_NEVERDELETE
- See Also:
- Constant Field Values
-
idField
public static final java.lang.String idField
- See Also:
- Constant Field Values
-
descriptionField
public static final java.lang.String descriptionField
- See Also:
- Constant Field Values
-
documentSpecField
public static final java.lang.String documentSpecField
- See Also:
- Constant Field Values
-
connectionNameField
public static final java.lang.String connectionNameField
- See Also:
- Constant Field Values
-
typeField
public static final java.lang.String typeField
- See Also:
- Constant Field Values
-
intervalField
public static final java.lang.String intervalField
This is the minimum reschedule interval for a document being crawled adaptively (in ms.)- See Also:
- Constant Field Values
-
maxIntervalField
public static final java.lang.String maxIntervalField
This is the maximum reschedule interval for a document being crawled adaptively (in ms.)- See Also:
- Constant Field Values
-
expirationField
public static final java.lang.String expirationField
This is the expiration time of documents for a given job (in ms.)- See Also:
- Constant Field Values
-
priorityField
public static final java.lang.String priorityField
This is the job's priority vs. other jobs.- See Also:
- Constant Field Values
-
startMethodField
public static final java.lang.String startMethodField
How/when to start the job- See Also:
- Constant Field Values
-
reseedIntervalField
public static final java.lang.String reseedIntervalField
If this is an adaptive job, what should the reseed interval be (in milliseconds)- See Also:
- Constant Field Values
-
statusField
public static final java.lang.String statusField
Status of this job.- See Also:
- Constant Field Values
-
lastTimeField
public static final java.lang.String lastTimeField
The last time this job was assessed, in ms. since epoch.- See Also:
- Constant Field Values
-
startTimeField
public static final java.lang.String startTimeField
If active, paused, activewait, or pausedwait, the start time of the current session, else null.- See Also:
- Constant Field Values
-
seedingVersionField
public static final java.lang.String seedingVersionField
This text data represents the seeding version string, which for many connectors is simply the last time seeding was done- See Also:
- Constant Field Values
-
endTimeField
public static final java.lang.String endTimeField
If inactive, the end time of the LAST session, if any.- See Also:
- Constant Field Values
-
windowEndField
public static final java.lang.String windowEndField
If non-null, this is the time that the current execution window closes, in ms since epoch.- See Also:
- Constant Field Values
-
errorField
public static final java.lang.String errorField
If non-null, this is the last error that occurred (which aborted the last task, either running the job or doing the delete cleanup).- See Also:
- Constant Field Values
-
reseedTimeField
public static final java.lang.String reseedTimeField
For an adaptive job, this is the next time to reseed the job.- See Also:
- Constant Field Values
-
hopcountModeField
public static final java.lang.String hopcountModeField
For a job whose connector supports hopcounts, this describes how those hopcounts are handled.- See Also:
- Constant Field Values
-
processIDField
public static final java.lang.String processIDField
Process id field, for keeping track of which process owns transient state- See Also:
- Constant Field Values
-
failTimeField
public static final java.lang.String failTimeField
When non-null, indicates the time that, when a ServiceInterruption occurs, the attempt will be considered to have actually failed- See Also:
- Constant Field Values
-
failCountField
public static final java.lang.String failCountField
When non-null, indicates the number of retries remaining, after which the attempt will be considered to have actually failed- See Also:
- Constant Field Values
-
assessmentStateField
public static final java.lang.String assessmentStateField
Set to N when the job needs connector-installed assessment- See Also:
- Constant Field Values
-
statusMap
protected static java.util.Map<java.lang.String,java.lang.Integer> statusMap
-
typeMap
protected static java.util.Map<java.lang.String,java.lang.Integer> typeMap
-
startMap
protected static java.util.Map<java.lang.String,java.lang.Integer> startMap
-
hopmodeMap
protected static java.util.Map<java.lang.String,java.lang.Integer> hopmodeMap
-
assessmentMap
protected static java.util.Map<java.lang.String,java.lang.Integer> assessmentMap
-
cacheManager
protected final ICacheManager cacheManager
-
scheduleManager
protected final ScheduleManager scheduleManager
-
hopFilterManager
protected final HopFilterManager hopFilterManager
-
pipelineManager
protected final PipelineManager pipelineManager
-
notificationManager
protected final NotificationManager notificationManager
-
outputMgr
protected final IOutputConnectionManager outputMgr
-
connectionMgr
protected final IRepositoryConnectionManager connectionMgr
-
transMgr
protected final ITransformationConnectionManager transMgr
-
lockManager
protected final ILockManager lockManager
-
threadContext
protected final IThreadContext threadContext
-
jobsLock
protected static final java.lang.String jobsLock
- See Also:
- Constant Field Values
-
FETCH_MAX
protected final int FETCH_MAX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Jobs
public Jobs(IThreadContext threadContext, IDBInterface database) throws ManifoldCFException
Constructor.- Parameters:
database
- is the database handle.- Throws:
ManifoldCFException
-
-
Method Detail
-
install
public void install(java.lang.String transTableName, java.lang.String transNameField, java.lang.String outputTableName, java.lang.String outputNameField, java.lang.String connectionTableName, java.lang.String connectionNameField, java.lang.String notificationConnectionTableName, java.lang.String notificationConnectionNameField) throws ManifoldCFException
Install or upgrade this table.- Throws:
ManifoldCFException
-
deinstall
public void deinstall() throws ManifoldCFException
Uninstall.- Throws:
ManifoldCFException
-
getAnalyzeTime
public int getAnalyzeTime() throws ManifoldCFException
Come up with a maximum time (in minutes) for re-analyzing tables.- Returns:
- the time, in minutes.
- Throws:
ManifoldCFException
-
analyzeTables
public void analyzeTables() throws ManifoldCFException
Analyze job tables that need analysis.- Throws:
ManifoldCFException
-
findJobsMatchingNotifications
public java.lang.Long[] findJobsMatchingNotifications(java.util.List<java.lang.String> notificationConnectionNames) throws ManifoldCFException
Find a list of jobs matching specified notification names.- Throws:
ManifoldCFException
-
findJobsMatchingTransformations
public java.lang.Long[] findJobsMatchingTransformations(java.util.List<java.lang.String> transformationConnectionNames) throws ManifoldCFException
Find a list of jobs matching specified transformation names.- Throws:
ManifoldCFException
-
findJobsMatchingOutputs
public java.lang.Long[] findJobsMatchingOutputs(java.util.List<java.lang.String> outputConnectionNames) throws ManifoldCFException
Find a list of jobs matching specified output names.- Throws:
ManifoldCFException
-
readScheduleRecords
public ScheduleRecord[][] readScheduleRecords(java.lang.Long[] jobIDs) throws ManifoldCFException
Read schedule records for a specified set of jobs. Cannot use caching!- Throws:
ManifoldCFException
-
getAll
public IJobDescription[] getAll() throws ManifoldCFException
Get a list of all jobs which are not in the process of being deleted already.- Returns:
- the array of all jobs.
- Throws:
ManifoldCFException
-
getActiveJobConnections
public IResultSet getActiveJobConnections() throws ManifoldCFException
Get a list of active job identifiers and their associated connection names.- Returns:
- a resultset with "jobid" and "connectionname" fields.
- Throws:
ManifoldCFException
-
getActiveConnectionNames
public java.lang.String[] getActiveConnectionNames() throws ManifoldCFException
Get unique connection names for all active jobs.- Returns:
- the array of connection names corresponding to active jobs.
- Throws:
ManifoldCFException
-
hasPriorityJobs
public boolean hasPriorityJobs(int priority) throws ManifoldCFException
Are there any jobs that have a specified priority level- Throws:
ManifoldCFException
-
create
public IJobDescription create() throws ManifoldCFException
Create a job.- Throws:
ManifoldCFException
-
delete
public void delete(java.lang.Long id) throws ManifoldCFException
Delete a job. This is not enough by itself; the queue entries also need to be deleted.- Parameters:
id
- is the job id.- Throws:
ManifoldCFException
-
load
public IJobDescription load(java.lang.Long id, boolean readOnly) throws ManifoldCFException
Load a job for editing.- Parameters:
id
- is the job id.- Returns:
- the editable job description.
- Throws:
ManifoldCFException
-
loadMultiple
public IJobDescription[] loadMultiple(java.lang.Long[] ids, boolean[] readOnlies) throws ManifoldCFException
Load multiple jobs for editing.- Parameters:
ids
- is the set of id's to loadreadOnlies
- are boolean values, set to true if the job description to be read is to be designated "read only".- Returns:
- the array of objects, in order.
- Throws:
ManifoldCFException
-
loadMultipleInternal
protected int loadMultipleInternal(IJobDescription[] rval, int outputIndex, java.lang.Long[] ids, boolean[] readOnlies, int inputIndex, int length) throws ManifoldCFException
- Throws:
ManifoldCFException
-
save
public void save(IJobDescription jobDescription) throws ManifoldCFException
Save a job description.- Parameters:
jobDescription
- is the job description.- Throws:
ManifoldCFException
-
clearSeedingState
public void clearSeedingState(java.lang.Long jobID) throws ManifoldCFException
Clear seeding state for a job.- Parameters:
jobID
- is the job whose state should be cleared.- Throws:
ManifoldCFException
-
restart
public void restart(java.lang.String processID) throws ManifoldCFException
This method is called on a restart.- Parameters:
processID
- is the process to be restarting.- Throws:
ManifoldCFException
-
restart
public void restart() throws ManifoldCFException
Clean up after all process IDs.- Throws:
ManifoldCFException
-
restartCluster
public void restartCluster() throws ManifoldCFException
- Throws:
ManifoldCFException
-
invalidateCurrentUnregisteredState
public void invalidateCurrentUnregisteredState(java.lang.Long jobID, int oldStatusValue) throws ManifoldCFException
Invalidate current state with respect to installed connectors, as a result of registration.- Throws:
ManifoldCFException
-
noteTransformationConnectorDeregistration
public void noteTransformationConnectorDeregistration(java.lang.Long jobID, int oldStatusValue) throws ManifoldCFException
Signal to a job that an underlying transformation connector has gone away.- Parameters:
jobID
- is the identifier of the job.oldStatusValue
- is the current status value for the job.- Throws:
ManifoldCFException
-
noteTransformationConnectorRegistration
public void noteTransformationConnectorRegistration(java.lang.Long jobID, int oldStatusValue) throws ManifoldCFException
Signal to a job that an underlying transformation connector has been registered.- Parameters:
jobID
- is the identifier of the job.oldStatusValue
- is the current status value for the job.- Throws:
ManifoldCFException
-
noteOutputConnectorDeregistration
public void noteOutputConnectorDeregistration(java.lang.Long jobID, int oldStatusValue) throws ManifoldCFException
Signal to a job that its underlying output connector has gone away.- Parameters:
jobID
- is the identifier of the job.oldStatusValue
- is the current status value for the job.- Throws:
ManifoldCFException
-
noteOutputConnectorRegistration
public void noteOutputConnectorRegistration(java.lang.Long jobID, int oldStatusValue) throws ManifoldCFException
Signal to a job that its underlying output connector has returned.- Parameters:
jobID
- is the identifier of the job.oldStatusValue
- is the current status value for the job.- Throws:
ManifoldCFException
-
noteNotificationConnectorDeregistration
public void noteNotificationConnectorDeregistration(java.lang.Long jobID, int oldStatusValue) throws ManifoldCFException
Signal to a job that its underlying notification connector has gone away.- Parameters:
jobID
- is the identifier of the job.oldStatusValue
- is the current status value for the job.- Throws:
ManifoldCFException
-
noteConnectorDeregistration
public void noteConnectorDeregistration(java.lang.Long jobID, int oldStatusValue) throws ManifoldCFException
Signal to a job that its underlying connector has gone away.- Parameters:
jobID
- is the identifier of the job.oldStatusValue
- is the current status value for the job.- Throws:
ManifoldCFException
-
noteNotificationConnectorRegistration
public void noteNotificationConnectorRegistration(java.lang.Long jobID, int oldStatusValue) throws ManifoldCFException
Signal to a job that its underlying notification connector has returned.- Parameters:
jobID
- is the identifier of the job.oldStatusValue
- is the current status value for the job.- Throws:
ManifoldCFException
-
noteConnectorRegistration
public void noteConnectorRegistration(java.lang.Long jobID, int oldStatusValue) throws ManifoldCFException
Signal to a job that its underlying connector has returned.- Parameters:
jobID
- is the identifier of the job.oldStatusValue
- is the current status value for the job.- Throws:
ManifoldCFException
-
noteConnectionChange
public void noteConnectionChange(java.lang.String connectionName) throws ManifoldCFException
Note a change in connection configuration. This method will be called whenever a connection's configuration is modified, or when an external repository change is signalled.- Throws:
ManifoldCFException
-
noteNotificationConnectionChange
public void noteNotificationConnectionChange(java.lang.String connectionName) throws ManifoldCFException
Note a change in notification connection configuration. This method will be called whenever a notification connection's configuration is modified, or when an external repository change is signalled.- Throws:
ManifoldCFException
-
noteOutputConnectionChange
public void noteOutputConnectionChange(java.lang.String connectionName) throws ManifoldCFException
Note a change in output connection configuration. This method will be called whenever a connection's configuration is modified, or when an external target config change is signalled.- Throws:
ManifoldCFException
-
noteTransformationConnectionChange
public void noteTransformationConnectionChange(java.lang.String connectionName) throws ManifoldCFException
Note a change in transformation connection configuration. This method will be called whenever a connection's configuration is modified.- Throws:
ManifoldCFException
-
checkJobActive
public boolean checkJobActive(java.lang.Long jobID) throws ManifoldCFException
Check whether a job's status indicates that it is in ACTIVE or ACTIVESEEDING state.- Throws:
ManifoldCFException
-
resetDeleteStartupWorkerStatus
public void resetDeleteStartupWorkerStatus(java.lang.String processID) throws ManifoldCFException
Reset delete startup worker thread status.- Throws:
ManifoldCFException
-
resetNotificationWorkerStatus
public void resetNotificationWorkerStatus(java.lang.String processID) throws ManifoldCFException
Reset notification worker thread status.- Throws:
ManifoldCFException
-
resetStartupWorkerStatus
public void resetStartupWorkerStatus(java.lang.String processID) throws ManifoldCFException
Reset startup worker thread status.- Throws:
ManifoldCFException
-
resetSeedingWorkerStatus
public void resetSeedingWorkerStatus(java.lang.String processID) throws ManifoldCFException
Reset as part of restoring seeding worker threads.- Throws:
ManifoldCFException
-
retryStartup
public void retryStartup(java.lang.Long jobID, boolean requestMinimum, long failTime, int failCount) throws ManifoldCFException
Retry startup.- Parameters:
jobID
- is the job identifier.requestMinimum
- is true for a minimal crawl.failTime
- is the fail time, -1 == nonefailCount
- is the fail count to use, -1 == none.- Throws:
ManifoldCFException
-
retrySeeding
public void retrySeeding(java.lang.Long jobID, long failTime, int failCount) throws ManifoldCFException
Retry seeding.- Parameters:
jobID
- is the job identifier.failTime
- is the fail time, -1 == nonefailCount
- is the fail count to use, -1 == none.- Throws:
ManifoldCFException
-
retryNotification
public void retryNotification(java.lang.Long jobID, long failTime, int failCount) throws ManifoldCFException
Retry notification.- Parameters:
jobID
- is the job identifier.failTime
- is the fail time, -1 == nonefailCount
- is the fail count to use, -1 == none.- Throws:
ManifoldCFException
-
retryDeleteNotification
public void retryDeleteNotification(java.lang.Long jobID, long failTime, int failCount) throws ManifoldCFException
Retry delete notification.- Parameters:
jobID
- is the job identifier.failTime
- is the fail time, -1 == nonefailCount
- is the fail count to use, -1 == none.- Throws:
ManifoldCFException
-
startJob
public void startJob(java.lang.Long jobID, java.lang.Long windowEnd, boolean requestMinimum) throws ManifoldCFException
Write job status and window end, and clear the endtime field. (The start time will be written when the job enters the "active" state.)- Parameters:
jobID
- is the job identifier.windowEnd
- is the window end time, if anyrequestMinimum
- is true if a minimal job run is requested- Throws:
ManifoldCFException
-
assessMarkedJobs
public void assessMarkedJobs() throws ManifoldCFException
Assess all marked jobs to determine if they can be reactivated.- Throws:
ManifoldCFException
-
returnJobToActive
public void returnJobToActive(java.lang.Long jobID) throws ManifoldCFException
Put job back into active state, from the shutting-down state.- Parameters:
jobID
- is the job identifier.- Throws:
ManifoldCFException
-
checkTransformationsInstalled
protected boolean checkTransformationsInstalled(java.lang.String[] transformationNames) throws ManifoldCFException
- Throws:
ManifoldCFException
-
checkOutputsInstalled
protected boolean checkOutputsInstalled(java.lang.String[] outputNames) throws ManifoldCFException
- Throws:
ManifoldCFException
-
noteJobDeleteStarted
public void noteJobDeleteStarted(java.lang.Long jobID, long startTime) throws ManifoldCFException
Put job into "deleting" state, and set the start time field.- Parameters:
jobID
- is the job identifier.startTime
- is the current time in milliseconds from start of epoch.- Throws:
ManifoldCFException
-
noteJobStarted
public void noteJobStarted(java.lang.Long jobID, long startTime, java.lang.String seedVersionString) throws ManifoldCFException
Make job active, and set the start time field.- Parameters:
jobID
- is the job identifier.startTime
- is the current time in milliseconds from start of epoch.seedVersionString
- is the version string to record for the seeding.- Throws:
ManifoldCFException
-
noteJobSeeded
public void noteJobSeeded(java.lang.Long jobID, java.lang.String seedVersionString) throws ManifoldCFException
Note job seeded.- Parameters:
jobID
- is the job id.seedVersionString
- is the job seed version string.- Throws:
ManifoldCFException
-
unwaitJob
public void unwaitJob(java.lang.Long jobID, int newStatus, java.lang.Long windowEnd) throws ManifoldCFException
Cause job that is in "wait" state to become un-waited.- Parameters:
jobID
- is the job identifier.newStatus
- is the new status (either STATUS_ACTIVE or STATUS_PAUSED or STATUS_ACTIVESEEDING or STATUS_PAUSEDSEEDING)windowEnd
- is the window end time, if any.- Throws:
ManifoldCFException
-
waitJob
public void waitJob(java.lang.Long jobID, int newStatus) throws ManifoldCFException
Cause job that is in active or paused state to become waited.- Parameters:
jobID
- is the job identifier.newStatus
- is the new status (either STATUS_ACTIVEWAIT or STATUS_PAUSEDWAIT or STATUS_ACTIVEWAITSEEDING or STATUS_PAUSEDWAITSEEDING)- Throws:
ManifoldCFException
-
abortJob
public boolean abortJob(java.lang.Long jobID, java.lang.String errorText) throws ManifoldCFException
Abort a job.- Parameters:
jobID
- is the job id.errorText
- is the error, or null if none.- Returns:
- true if there wasn't an abort already logged for this job.
- Throws:
ManifoldCFException
-
abortRestartJob
public void abortRestartJob(java.lang.Long jobID, boolean requestMinimum) throws ManifoldCFException
Restart a job. Finish off what's currently happening, and then start the job up again.- Parameters:
jobID
- is the job id.requestMinimum
- is true if the minimal job run is requested.- Throws:
ManifoldCFException
-
pauseJob
public void pauseJob(java.lang.Long jobID) throws ManifoldCFException
Pause a job.- Parameters:
jobID
- is the job id.- Throws:
ManifoldCFException
-
restartJob
public void restartJob(java.lang.Long jobID) throws ManifoldCFException
Restart a job.- Parameters:
jobID
- is the job id.- Throws:
ManifoldCFException
-
writeTransientStatus
public void writeTransientStatus(java.lang.Long jobID, int status, java.lang.Long reseedTime, java.lang.String processID) throws ManifoldCFException
Update a job's status, and its reseed time.- Parameters:
jobID
- is the job id.status
- is the desired status.reseedTime
- is the reseed time.- Throws:
ManifoldCFException
-
writePermanentStatus
public void writePermanentStatus(java.lang.Long jobID, int status, java.lang.Long reseedTime) throws ManifoldCFException
Update a job's status, and its reseed time.- Parameters:
jobID
- is the job id.status
- is the desired status.reseedTime
- is the reseed time.- Throws:
ManifoldCFException
-
writePermanentStatus
public void writePermanentStatus(java.lang.Long jobID, int status, java.lang.Long reseedTime, boolean clearFailTime) throws ManifoldCFException
Update a job's status, and its reseed time.- Parameters:
jobID
- is the job id.status
- is the desired status.reseedTime
- is the reseed time.- Throws:
ManifoldCFException
-
writeStatus
protected void writeStatus(java.lang.Long jobID, int status, java.lang.Long reseedTime, java.lang.String processID, boolean clearFailTime) throws ManifoldCFException
Update a job's status, and its reseed time.- Parameters:
jobID
- is the job id.status
- is the desired status.reseedTime
- is the reseed time.- Throws:
ManifoldCFException
-
writeTransientStatus
public void writeTransientStatus(java.lang.Long jobID, int status, java.lang.String processID) throws ManifoldCFException
Update a job's status.- Parameters:
jobID
- is the job id.status
- is the desired status.- Throws:
ManifoldCFException
-
writePermanentStatus
public void writePermanentStatus(java.lang.Long jobID, int status) throws ManifoldCFException
Update a job's status.- Parameters:
jobID
- is the job id.status
- is the desired status.- Throws:
ManifoldCFException
-
writePermanentStatus
public void writePermanentStatus(java.lang.Long jobID, int status, boolean clearFailTime) throws ManifoldCFException
Update a job's status.- Parameters:
jobID
- is the job id.status
- is the desired status.- Throws:
ManifoldCFException
-
writeStatus
protected void writeStatus(java.lang.Long jobID, int status, java.lang.String processID, boolean clearFailTime) throws ManifoldCFException
Update a job's status.- Parameters:
jobID
- is the job id.status
- is the desired status.- Throws:
ManifoldCFException
-
updateLastTime
public void updateLastTime(java.lang.Long jobID, long currentTime) throws ManifoldCFException
Update a job's last-time field.- Parameters:
jobID
- is the job id.currentTime
- is the current time.- Throws:
ManifoldCFException
-
finishJob
public void finishJob(java.lang.Long jobID, long finishTime) throws ManifoldCFException
Finish a job. Write completion and the current time.- Parameters:
jobID
- is the job id.finishTime
- is the finish time.- Throws:
ManifoldCFException
-
finishJobCleanup
public void finishJobCleanup(java.lang.Long jobID) throws ManifoldCFException
Finish job cleanup. Write completion and the current time.- Parameters:
jobID
- is the job id.- Throws:
ManifoldCFException
-
finishResumeJob
public void finishResumeJob(java.lang.Long jobID, long currentTime) throws ManifoldCFException
Resume a stopped job (from a pause or activewait). Updates the job record in a manner consistent with the job's state.- Throws:
ManifoldCFException
-
finishStopJob
public void finishStopJob(java.lang.Long jobID, long currentTime) throws ManifoldCFException
Stop a job suddenly (abort, pause, activewait). Updates the job record in a manner consistent with the job's state.- Throws:
ManifoldCFException
-
notificationComplete
public void notificationComplete(java.lang.Long jobID) throws ManifoldCFException
Mark job as having properly notified the output connector of completion.- Parameters:
jobID
- is the job id.- Throws:
ManifoldCFException
-
checkIfReference
public boolean checkIfReference(java.lang.String connectionName) throws ManifoldCFException
See if there's a reference to a connection name.- Parameters:
connectionName
- is the name of the connection.- Returns:
- true if there is a reference, false otherwise.
- Throws:
ManifoldCFException
-
checkIfNotificationReference
public boolean checkIfNotificationReference(java.lang.String connectionName) throws ManifoldCFException
See if there's a reference to a notification connection name.- Parameters:
connectionName
- is the name of the connection.- Returns:
- true if there is a reference, false otherwise.
- Throws:
ManifoldCFException
-
checkIfOutputReference
public boolean checkIfOutputReference(java.lang.String connectionName) throws ManifoldCFException
See if there's a reference to an output connection name.- Parameters:
connectionName
- is the name of the connection.- Returns:
- true if there is a reference, false otherwise.
- Throws:
ManifoldCFException
-
checkIfTransformationReference
public boolean checkIfTransformationReference(java.lang.String connectionName) throws ManifoldCFException
See if there's a reference to a transformation connection name.- Parameters:
connectionName
- is the name of the connection.- Returns:
- true if there is a reference, false otherwise.
- Throws:
ManifoldCFException
-
findJobsForConnection
public IJobDescription[] findJobsForConnection(java.lang.String connectionName) throws ManifoldCFException
Get the job IDs associated with a given connection name.- Parameters:
connectionName
- is the name of the connection.- Returns:
- the set of job id's associated with that connection.
- Throws:
ManifoldCFException
-
deletingJobsPresent
public boolean deletingJobsPresent() throws ManifoldCFException
Return true if there is a job in the DELETING state. (This matches the conditions for values to be returned from getNextDeletableDocuments).- Returns:
- true if such jobs exist.
- Throws:
ManifoldCFException
-
cleaningJobsPresent
public boolean cleaningJobsPresent() throws ManifoldCFException
Return true if there is a job in the SHUTTINGDOWN state. (This matches the conditions for values to be returned from getNextCleanableDocuments).- Returns:
- true if such jobs exist.
- Throws:
ManifoldCFException
-
activeJobsPresent
public boolean activeJobsPresent() throws ManifoldCFException
Return true if there is a job in either the ACTIVE or the ACTIVESEEDING state. (This matches the conditions for values to be returned from getNextDocuments).- Returns:
- true if such jobs exist.
- Throws:
ManifoldCFException
-
stringToStatus
public static int stringToStatus(java.lang.String value) throws ManifoldCFException
Go from string to status.- Parameters:
value
- is the string.- Returns:
- the status value.
- Throws:
ManifoldCFException
-
statusToString
public static java.lang.String statusToString(int status) throws ManifoldCFException
Go from status to string.- Parameters:
status
- is the status.- Returns:
- the string.
- Throws:
ManifoldCFException
-
stringToType
public static int stringToType(java.lang.String value) throws ManifoldCFException
Go from string to type.- Parameters:
value
- is the string.- Returns:
- the type value.
- Throws:
ManifoldCFException
-
typeToString
public static java.lang.String typeToString(int type) throws ManifoldCFException
Go from type to string.- Parameters:
type
- is the type.- Returns:
- the string.
- Throws:
ManifoldCFException
-
stringToAssessmentState
public static int stringToAssessmentState(java.lang.String value) throws ManifoldCFException
Go from string to assessment state.- Throws:
ManifoldCFException
-
assessmentStateToString
public static java.lang.String assessmentStateToString(int value) throws ManifoldCFException
Go from assessment state to string.- Throws:
ManifoldCFException
-
stringToHopcountMode
public static int stringToHopcountMode(java.lang.String value) throws ManifoldCFException
Go from string to hopcount mode.- Throws:
ManifoldCFException
-
hopcountModeToString
public static java.lang.String hopcountModeToString(int value) throws ManifoldCFException
Go from hopcount mode to string.- Throws:
ManifoldCFException
-
stringToStartMethod
public static int stringToStartMethod(java.lang.String value) throws ManifoldCFException
Go from string to start method.- Parameters:
value
- is the string.- Returns:
- the start method value.
- Throws:
ManifoldCFException
-
startMethodToString
public static java.lang.String startMethodToString(int startMethod) throws ManifoldCFException
Get from start method to string.- Parameters:
startMethod
- is the start method.- Returns:
- a string.
- Throws:
ManifoldCFException
-
stringToEnumeratedValue
public static EnumeratedValues stringToEnumeratedValue(java.lang.String value) throws ManifoldCFException
Go from string to enumerated value.- Parameters:
value
- is the input.- Returns:
- the enumerated value.
- Throws:
ManifoldCFException
-
enumeratedValueToString
public static java.lang.String enumeratedValueToString(EnumeratedValues values)
Go from enumerated value to string.- Parameters:
values
- is the enumerated value.- Returns:
- the string value.
-
getJobsKey
protected static java.lang.String getJobsKey()
-
getJobIDKey
protected static java.lang.String getJobIDKey(java.lang.Long jobID)
-
getJobStatusKey
protected static java.lang.String getJobStatusKey()
-
getJobsMultiple
protected JobDescription[] getJobsMultiple(java.lang.Long[] ids) throws ManifoldCFException
Get multiple jobs (without caching)- Parameters:
ids
- is the set of ids to get jobs for.- Returns:
- the corresponding job descriptions.
- Throws:
ManifoldCFException
-
getJobsChunk
protected void getJobsChunk(java.util.Map<java.lang.Long,JobDescription> returnValues, java.lang.String idList, java.util.ArrayList params) throws ManifoldCFException
Read a chunk of repository connections.- Parameters:
returnValues
- is keyed by id and contains a JobDescription value.idList
- is the list of id's.params
- is the set of parameters.- Throws:
ManifoldCFException
-
-