Class Jobs


  • public class Jobs
    extends BaseTable
    This class manages the jobs table.

    jobs
    FieldTypeDescription        
    idBIGINTPrimary Key
    descriptionVARCHAR(255)
    statusCHAR(1)operational field
    lasttimeBIGINToperational field
    starttimeBIGINToperational field
    lastchecktimeBIGINToperational field
    seedingversionLONGTEXToperational field
    endtimeBIGINToperational field
    docspecLONGTEXT
    connectionnameVARCHAR(32)Reference:repoconnections.connectionname
    typeCHAR(1)
    intervaltimeBIGINT
    maxintervaltimeBIGINT
    expirationtimeBIGINT
    windowendBIGINT
    priorityBIGINT
    startmethodCHAR(1)
    errortextLONGTEXT
    reseedintervalBIGINT
    reseedtimeBIGINT
    hopcountmodeCHAR(1)
    processidVARCHAR(16)
    failtimeBIGINT
    failcountBIGINT
    assessmentstateCHAR(1)


    • Field Detail

      • STATUS_ACTIVEWAITINGSEEDING

        public static final int STATUS_ACTIVEWAITINGSEEDING
        See Also:
        Constant Field Values
      • STATUS_ACTIVEWAITSEEDING

        public static final int STATUS_ACTIVEWAITSEEDING
        See Also:
        Constant Field Values
      • STATUS_PAUSINGWAITINGSEEDING

        public static final int STATUS_PAUSINGWAITINGSEEDING
        See Also:
        Constant Field Values
      • STATUS_PAUSEDWAITSEEDING

        public static final int STATUS_PAUSEDWAITSEEDING
        See Also:
        Constant Field Values
      • STATUS_STARTINGUPMINIMAL

        public static final int STATUS_STARTINGUPMINIMAL
        See Also:
        Constant Field Values
      • STATUS_READYFORSTARTUPMINIMAL

        public static final int STATUS_READYFORSTARTUPMINIMAL
        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_NOTIFYINGOFCOMPLETION

        public static final int STATUS_NOTIFYINGOFCOMPLETION
        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_ACTIVESEEDING_NOOUTPUT

        public static final int STATUS_ACTIVESEEDING_NOOUTPUT
        See Also:
        Constant Field Values
      • STATUS_ACTIVESEEDING_NEITHER

        public static final int STATUS_ACTIVESEEDING_NEITHER
        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
      • 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
    • 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
      • 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
      • 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
      • 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
      • 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
      • 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 load
        readOnlies - 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
      • 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
      • 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
      • 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 == none
        failCount - 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 == none
        failCount - 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 == none
        failCount - 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 == none
        failCount - 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 any
        requestMinimum - is true if a minimal job run is requested
        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
      • 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
      • 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
      • 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
      • 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