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 classJobs.JobObjectDescriptionJob object description class.protected static classJobs.JobObjectExecutorThis is the executor object for locating job objects.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String_rcsidstatic intASSESSMENT_KNOWNstatic intASSESSMENT_UNKNOWNprotected static java.util.Map<java.lang.String,java.lang.Integer>assessmentMapstatic java.lang.StringassessmentStateFieldSet to N when the job needs connector-installed assessmentprotected ICacheManagercacheManagerprotected IRepositoryConnectionManagerconnectionMgrstatic java.lang.StringconnectionNameFieldstatic java.lang.StringdescriptionFieldstatic java.lang.StringdocumentSpecFieldstatic java.lang.StringendTimeFieldIf inactive, the end time of the LAST session, if any.static java.lang.StringerrorFieldIf 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.StringexpirationFieldThis is the expiration time of documents for a given job (in ms.)static java.lang.StringfailCountFieldWhen non-null, indicates the number of retries remaining, after which the attempt will be considered to have actually failedstatic java.lang.StringfailTimeFieldWhen non-null, indicates the time that, when a ServiceInterruption occurs, the attempt will be considered to have actually failedprotected intFETCH_MAXstatic intHOPCOUNT_ACCURATEstatic intHOPCOUNT_NEVERDELETEstatic intHOPCOUNT_NODELETEstatic java.lang.StringhopcountModeFieldFor a job whose connector supports hopcounts, this describes how those hopcounts are handled.protected HopFilterManagerhopFilterManagerprotected static java.util.Map<java.lang.String,java.lang.Integer>hopmodeMapstatic java.lang.StringidFieldstatic java.lang.StringintervalFieldThis is the minimum reschedule interval for a document being crawled adaptively (in ms.)protected static java.lang.StringjobsLockstatic java.lang.StringlastTimeFieldThe last time this job was assessed, in ms.protected ILockManagerlockManagerstatic java.lang.StringmaxIntervalFieldThis is the maximum reschedule interval for a document being crawled adaptively (in ms.)protected NotificationManagernotificationManagerprotected IOutputConnectionManageroutputMgrprotected PipelineManagerpipelineManagerstatic java.lang.StringpriorityFieldThis is the job's priority vs.static java.lang.StringprocessIDFieldProcess id field, for keeping track of which process owns transient statestatic java.lang.StringreseedIntervalFieldIf this is an adaptive job, what should the reseed interval be (in milliseconds)static java.lang.StringreseedTimeFieldFor an adaptive job, this is the next time to reseed the job.protected ScheduleManagerscheduleManagerstatic java.lang.StringseedingVersionFieldThis text data represents the seeding version string, which for many connectors is simply the last time seeding was donestatic intSTART_DISABLEstatic intSTART_WINDOWBEGINstatic intSTART_WINDOWINSIDEprotected static java.util.Map<java.lang.String,java.lang.Integer>startMapstatic java.lang.StringstartMethodFieldHow/when to start the jobstatic java.lang.StringstartTimeFieldIf active, paused, activewait, or pausedwait, the start time of the current session, else null.static intSTATUS_ABORTINGstatic intSTATUS_ABORTINGFORRESTARTstatic intSTATUS_ABORTINGFORRESTARTMINIMALstatic intSTATUS_ABORTINGFORRESTARTSEEDINGstatic intSTATUS_ABORTINGFORRESTARTSEEDINGMINIMALstatic intSTATUS_ABORTINGSHUTTINGDOWNstatic intSTATUS_ABORTINGSTARTINGUPFORRESTARTstatic intSTATUS_ABORTINGSTARTINGUPFORRESTARTMINIMALstatic intSTATUS_ACTIVEstatic intSTATUS_ACTIVE_NEITHERstatic intSTATUS_ACTIVE_NOOUTPUTstatic intSTATUS_ACTIVE_UNINSTALLEDstatic intSTATUS_ACTIVESEEDINGstatic intSTATUS_ACTIVESEEDING_NEITHERstatic intSTATUS_ACTIVESEEDING_NOOUTPUTstatic intSTATUS_ACTIVESEEDING_UNINSTALLEDstatic intSTATUS_ACTIVEWAITstatic intSTATUS_ACTIVEWAITINGstatic intSTATUS_ACTIVEWAITINGSEEDINGstatic intSTATUS_ACTIVEWAITSEEDINGstatic intSTATUS_DELETESTARTINGUPstatic intSTATUS_DELETINGstatic intSTATUS_DELETING_NOOUTPUTstatic intSTATUS_INACTIVEstatic intSTATUS_NOTIFYINGOFCOMPLETIONstatic intSTATUS_NOTIFYINGOFDELETIONstatic intSTATUS_PAUSEDstatic intSTATUS_PAUSEDSEEDINGstatic intSTATUS_PAUSEDWAITstatic intSTATUS_PAUSEDWAITSEEDINGstatic intSTATUS_PAUSINGstatic intSTATUS_PAUSINGSEEDINGstatic intSTATUS_PAUSINGWAITINGstatic intSTATUS_PAUSINGWAITINGSEEDINGstatic intSTATUS_READYFORDELETEstatic intSTATUS_READYFORDELETENOTIFYstatic intSTATUS_READYFORNOTIFYstatic intSTATUS_READYFORSTARTUPstatic intSTATUS_READYFORSTARTUPMINIMALstatic intSTATUS_RESUMINGstatic intSTATUS_RESUMINGSEEDINGstatic intSTATUS_SHUTTINGDOWNstatic intSTATUS_STARTINGUPstatic intSTATUS_STARTINGUPMINIMALstatic java.lang.StringstatusFieldStatus of this job.protected static java.util.Map<java.lang.String,java.lang.Integer>statusMapprotected IThreadContextthreadContextprotected ITransformationConnectionManagertransMgrstatic intTYPE_CONTINUOUSstatic intTYPE_SPECIFIEDstatic java.lang.StringtypeFieldprotected static java.util.Map<java.lang.String,java.lang.Integer>typeMapstatic java.lang.StringwindowEndFieldIf 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 booleanabortJob(java.lang.Long jobID, java.lang.String errorText)Abort a job.voidabortRestartJob(java.lang.Long jobID, boolean requestMinimum)Restart a job.booleanactiveJobsPresent()Return true if there is a job in either the ACTIVE or the ACTIVESEEDING state.voidanalyzeTables()Analyze job tables that need analysis.voidassessMarkedJobs()Assess all marked jobs to determine if they can be reactivated.static java.lang.StringassessmentStateToString(int value)Go from assessment state to string.booleancheckIfNotificationReference(java.lang.String connectionName)See if there's a reference to a notification connection name.booleancheckIfOutputReference(java.lang.String connectionName)See if there's a reference to an output connection name.booleancheckIfReference(java.lang.String connectionName)See if there's a reference to a connection name.booleancheckIfTransformationReference(java.lang.String connectionName)See if there's a reference to a transformation connection name.booleancheckJobActive(java.lang.Long jobID)Check whether a job's status indicates that it is in ACTIVE or ACTIVESEEDING state.protected booleancheckOutputsInstalled(java.lang.String[] outputNames)protected booleancheckTransformationsInstalled(java.lang.String[] transformationNames)booleancleaningJobsPresent()Return true if there is a job in the SHUTTINGDOWN state.voidclearSeedingState(java.lang.Long jobID)Clear seeding state for a job.IJobDescriptioncreate()Create a job.voiddeinstall()Uninstall.voiddelete(java.lang.Long id)Delete a job.booleandeletingJobsPresent()Return true if there is a job in the DELETING state.static java.lang.StringenumeratedValueToString(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.voidfinishJob(java.lang.Long jobID, long finishTime)Finish a job.voidfinishJobCleanup(java.lang.Long jobID)Finish job cleanup.voidfinishResumeJob(java.lang.Long jobID, long currentTime)Resume a stopped job (from a pause or activewait).voidfinishStopJob(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.IResultSetgetActiveJobConnections()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.intgetAnalyzeTime()Come up with a maximum time (in minutes) for re-analyzing tables.protected static java.lang.StringgetJobIDKey(java.lang.Long jobID)protected voidgetJobsChunk(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.StringgetJobsKey()protected JobDescription[]getJobsMultiple(java.lang.Long[] ids)Get multiple jobs (without caching)protected static java.lang.StringgetJobStatusKey()booleanhasPriorityJobs(int priority)Are there any jobs that have a specified priority levelstatic java.lang.StringhopcountModeToString(int value)Go from hopcount mode to string.voidinstall(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.voidinvalidateCurrentUnregisteredState(java.lang.Long jobID, int oldStatusValue)Invalidate current state with respect to installed connectors, as a result of registration.IJobDescriptionload(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 intloadMultipleInternal(IJobDescription[] rval, int outputIndex, java.lang.Long[] ids, boolean[] readOnlies, int inputIndex, int length)voidnoteConnectionChange(java.lang.String connectionName)Note a change in connection configuration.voidnoteConnectorDeregistration(java.lang.Long jobID, int oldStatusValue)Signal to a job that its underlying connector has gone away.voidnoteConnectorRegistration(java.lang.Long jobID, int oldStatusValue)Signal to a job that its underlying connector has returned.voidnoteJobDeleteStarted(java.lang.Long jobID, long startTime)Put job into "deleting" state, and set the start time field.voidnoteJobSeeded(java.lang.Long jobID, java.lang.String seedVersionString)Note job seeded.voidnoteJobStarted(java.lang.Long jobID, long startTime, java.lang.String seedVersionString)Make job active, and set the start time field.voidnoteNotificationConnectionChange(java.lang.String connectionName)Note a change in notification connection configuration.voidnoteNotificationConnectorDeregistration(java.lang.Long jobID, int oldStatusValue)Signal to a job that its underlying notification connector has gone away.voidnoteNotificationConnectorRegistration(java.lang.Long jobID, int oldStatusValue)Signal to a job that its underlying notification connector has returned.voidnoteOutputConnectionChange(java.lang.String connectionName)Note a change in output connection configuration.voidnoteOutputConnectorDeregistration(java.lang.Long jobID, int oldStatusValue)Signal to a job that its underlying output connector has gone away.voidnoteOutputConnectorRegistration(java.lang.Long jobID, int oldStatusValue)Signal to a job that its underlying output connector has returned.voidnoteTransformationConnectionChange(java.lang.String connectionName)Note a change in transformation connection configuration.voidnoteTransformationConnectorDeregistration(java.lang.Long jobID, int oldStatusValue)Signal to a job that an underlying transformation connector has gone away.voidnoteTransformationConnectorRegistration(java.lang.Long jobID, int oldStatusValue)Signal to a job that an underlying transformation connector has been registered.voidnotificationComplete(java.lang.Long jobID)Mark job as having properly notified the output connector of completion.voidpauseJob(java.lang.Long jobID)Pause a job.ScheduleRecord[][]readScheduleRecords(java.lang.Long[] jobIDs)Read schedule records for a specified set of jobs.voidresetDeleteStartupWorkerStatus(java.lang.String processID)Reset delete startup worker thread status.voidresetNotificationWorkerStatus(java.lang.String processID)Reset notification worker thread status.voidresetSeedingWorkerStatus(java.lang.String processID)Reset as part of restoring seeding worker threads.voidresetStartupWorkerStatus(java.lang.String processID)Reset startup worker thread status.voidrestart()Clean up after all process IDs.voidrestart(java.lang.String processID)This method is called on a restart.voidrestartCluster()voidrestartJob(java.lang.Long jobID)Restart a job.voidretryDeleteNotification(java.lang.Long jobID, long failTime, int failCount)Retry delete notification.voidretryNotification(java.lang.Long jobID, long failTime, int failCount)Retry notification.voidretrySeeding(java.lang.Long jobID, long failTime, int failCount)Retry seeding.voidretryStartup(java.lang.Long jobID, boolean requestMinimum, long failTime, int failCount)Retry startup.voidreturnJobToActive(java.lang.Long jobID)Put job back into active state, from the shutting-down state.voidsave(IJobDescription jobDescription)Save a job description.voidstartJob(java.lang.Long jobID, java.lang.Long windowEnd, boolean requestMinimum)Write job status and window end, and clear the endtime field.static java.lang.StringstartMethodToString(int startMethod)Get from start method to string.static java.lang.StringstatusToString(int status)Go from status to string.static intstringToAssessmentState(java.lang.String value)Go from string to assessment state.static EnumeratedValuesstringToEnumeratedValue(java.lang.String value)Go from string to enumerated value.static intstringToHopcountMode(java.lang.String value)Go from string to hopcount mode.static intstringToStartMethod(java.lang.String value)Go from string to start method.static intstringToStatus(java.lang.String value)Go from string to status.static intstringToType(java.lang.String value)Go from string to type.static java.lang.StringtypeToString(int type)Go from type to string.voidunwaitJob(java.lang.Long jobID, int newStatus, java.lang.Long windowEnd)Cause job that is in "wait" state to become un-waited.voidupdateLastTime(java.lang.Long jobID, long currentTime)Update a job's last-time field.voidwaitJob(java.lang.Long jobID, int newStatus)Cause job that is in active or paused state to become waited.voidwritePermanentStatus(java.lang.Long jobID, int status)Update a job's status.voidwritePermanentStatus(java.lang.Long jobID, int status, boolean clearFailTime)Update a job's status.voidwritePermanentStatus(java.lang.Long jobID, int status, java.lang.Long reseedTime)Update a job's status, and its reseed time.voidwritePermanentStatus(java.lang.Long jobID, int status, java.lang.Long reseedTime, boolean clearFailTime)Update a job's status, and its reseed time.protected voidwriteStatus(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 voidwriteStatus(java.lang.Long jobID, int status, java.lang.String processID, boolean clearFailTime)Update a job's status.voidwriteTransientStatus(java.lang.Long jobID, int status, java.lang.Long reseedTime, java.lang.String processID)Update a job's status, and its reseed time.voidwriteTransientStatus(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 ManifoldCFExceptionInstall or upgrade this table.- Throws:
ManifoldCFException
-
deinstall
public void deinstall() throws ManifoldCFExceptionUninstall.- Throws:
ManifoldCFException
-
getAnalyzeTime
public int getAnalyzeTime() throws ManifoldCFExceptionCome up with a maximum time (in minutes) for re-analyzing tables.- Returns:
- the time, in minutes.
- Throws:
ManifoldCFException
-
analyzeTables
public void analyzeTables() throws ManifoldCFExceptionAnalyze job tables that need analysis.- Throws:
ManifoldCFException
-
findJobsMatchingNotifications
public java.lang.Long[] findJobsMatchingNotifications(java.util.List<java.lang.String> notificationConnectionNames) throws ManifoldCFExceptionFind a list of jobs matching specified notification names.- Throws:
ManifoldCFException
-
findJobsMatchingTransformations
public java.lang.Long[] findJobsMatchingTransformations(java.util.List<java.lang.String> transformationConnectionNames) throws ManifoldCFExceptionFind a list of jobs matching specified transformation names.- Throws:
ManifoldCFException
-
findJobsMatchingOutputs
public java.lang.Long[] findJobsMatchingOutputs(java.util.List<java.lang.String> outputConnectionNames) throws ManifoldCFExceptionFind 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 ManifoldCFExceptionGet 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 ManifoldCFExceptionAre 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 ManifoldCFExceptionDelete 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 ManifoldCFExceptionClear 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 ManifoldCFExceptionThis method is called on a restart.- Parameters:
processID- is the process to be restarting.- Throws:
ManifoldCFException
-
restart
public void restart() throws ManifoldCFExceptionClean 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 ManifoldCFExceptionInvalidate 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 ManifoldCFExceptionSignal 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 ManifoldCFExceptionSignal 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 ManifoldCFExceptionSignal 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 ManifoldCFExceptionSignal 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 ManifoldCFExceptionSignal 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 ManifoldCFExceptionSignal 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 ManifoldCFExceptionSignal 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 ManifoldCFExceptionSignal 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 ManifoldCFExceptionNote 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 ManifoldCFExceptionNote 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 ManifoldCFExceptionNote 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 ManifoldCFExceptionNote 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 ManifoldCFExceptionCheck 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 ManifoldCFExceptionReset delete startup worker thread status.- Throws:
ManifoldCFException
-
resetNotificationWorkerStatus
public void resetNotificationWorkerStatus(java.lang.String processID) throws ManifoldCFExceptionReset notification worker thread status.- Throws:
ManifoldCFException
-
resetStartupWorkerStatus
public void resetStartupWorkerStatus(java.lang.String processID) throws ManifoldCFExceptionReset startup worker thread status.- Throws:
ManifoldCFException
-
resetSeedingWorkerStatus
public void resetSeedingWorkerStatus(java.lang.String processID) throws ManifoldCFExceptionReset as part of restoring seeding worker threads.- Throws:
ManifoldCFException
-
retryStartup
public void retryStartup(java.lang.Long jobID, boolean requestMinimum, long failTime, int failCount) throws ManifoldCFExceptionRetry 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 ManifoldCFExceptionRetry 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 ManifoldCFExceptionRetry 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 ManifoldCFExceptionRetry 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 ManifoldCFExceptionWrite 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 ManifoldCFExceptionAssess all marked jobs to determine if they can be reactivated.- Throws:
ManifoldCFException
-
returnJobToActive
public void returnJobToActive(java.lang.Long jobID) throws ManifoldCFExceptionPut 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 ManifoldCFExceptionPut 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 ManifoldCFExceptionMake 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 ManifoldCFExceptionNote 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 ManifoldCFExceptionCause 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 ManifoldCFExceptionCause 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 ManifoldCFExceptionAbort 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 ManifoldCFExceptionRestart 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 ManifoldCFExceptionPause a job.- Parameters:
jobID- is the job id.- Throws:
ManifoldCFException
-
restartJob
public void restartJob(java.lang.Long jobID) throws ManifoldCFExceptionRestart 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 ManifoldCFExceptionUpdate 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 ManifoldCFExceptionUpdate 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 ManifoldCFExceptionUpdate 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 ManifoldCFExceptionUpdate 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 ManifoldCFExceptionUpdate 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 ManifoldCFExceptionUpdate 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 ManifoldCFExceptionUpdate 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 ManifoldCFExceptionUpdate 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 ManifoldCFExceptionUpdate 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 ManifoldCFExceptionFinish 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 ManifoldCFExceptionFinish 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 ManifoldCFExceptionResume 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 ManifoldCFExceptionStop 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 ManifoldCFExceptionMark 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 ManifoldCFExceptionSee 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 ManifoldCFExceptionSee 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 ManifoldCFExceptionSee 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 ManifoldCFExceptionSee 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 ManifoldCFExceptionReturn 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 ManifoldCFExceptionReturn 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 ManifoldCFExceptionReturn 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 ManifoldCFExceptionGo 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 ManifoldCFExceptionGo from status to string.- Parameters:
status- is the status.- Returns:
- the string.
- Throws:
ManifoldCFException
-
stringToType
public static int stringToType(java.lang.String value) throws ManifoldCFExceptionGo 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 ManifoldCFExceptionGo from type to string.- Parameters:
type- is the type.- Returns:
- the string.
- Throws:
ManifoldCFException
-
stringToAssessmentState
public static int stringToAssessmentState(java.lang.String value) throws ManifoldCFExceptionGo from string to assessment state.- Throws:
ManifoldCFException
-
assessmentStateToString
public static java.lang.String assessmentStateToString(int value) throws ManifoldCFExceptionGo from assessment state to string.- Throws:
ManifoldCFException
-
stringToHopcountMode
public static int stringToHopcountMode(java.lang.String value) throws ManifoldCFExceptionGo from string to hopcount mode.- Throws:
ManifoldCFException
-
hopcountModeToString
public static java.lang.String hopcountModeToString(int value) throws ManifoldCFExceptionGo from hopcount mode to string.- Throws:
ManifoldCFException
-
stringToStartMethod
public static int stringToStartMethod(java.lang.String value) throws ManifoldCFExceptionGo 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 ManifoldCFExceptionGet 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
-
-