You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@manifoldcf.apache.org by kw...@apache.org on 2014/12/19 01:53:06 UTC

svn commit: r1646600 - in /manifoldcf/branches/CONNECTORS-1119/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs: JobManager.java Jobs.java

Author: kwright
Date: Fri Dec 19 00:53:06 2014
New Revision: 1646600

URL: http://svn.apache.org/r1646600
Log:
Flesh out job manager notification connector registration/deregistration.

Modified:
    manifoldcf/branches/CONNECTORS-1119/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java
    manifoldcf/branches/CONNECTORS-1119/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/Jobs.java

Modified: manifoldcf/branches/CONNECTORS-1119/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1119/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java?rev=1646600&r1=1646599&r2=1646600&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-1119/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java (original)
+++ manifoldcf/branches/CONNECTORS-1119/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobManager.java Fri Dec 19 00:53:06 2014
@@ -426,11 +426,9 @@ public class JobManager implements IJobM
   protected void noteNotificationConnectionDeregistration(List<String> list)
     throws ManifoldCFException
   {
-    // MHL
-    /*
     ArrayList newList = new ArrayList();
     String query = database.buildConjunctionClause(newList,new ClauseDescription[]{
-      new MultiClause(jobs.connectionNameField,list)});
+      new MultiClause(jobs.notificationNameField,list)});
     // Query for the matching jobs, and then for each job potentially adjust the state
     IResultSet set = database.performQuery("SELECT "+jobs.idField+","+jobs.statusField+" FROM "+
       jobs.getTableName()+" WHERE "+query+" FOR UPDATE",
@@ -441,10 +439,9 @@ public class JobManager implements IJobM
       IResultRow row = set.getRow(i++);
       Long jobID = (Long)row.getValue(jobs.idField);
       int statusValue = jobs.stringToStatus((String)row.getValue(jobs.statusField));
-      jobs.noteConnectorDeregistration(jobID,statusValue);
+      jobs.noteNotificationConnectorDeregistration(jobID,statusValue);
     }
-    */
-  }
+ }
 
   /** Note the registration of a notification connector used by the specified connections.
   * This method will be called when a connector is registered, on which the specified
@@ -482,11 +479,9 @@ public class JobManager implements IJobM
     throws ManifoldCFException
   {
     // Query for the matching jobs, and then for each job potentially adjust the state
-    // MHL
-    /*
     ArrayList newList = new ArrayList();
     String query = database.buildConjunctionClause(newList,new ClauseDescription[]{
-      new MultiClause(jobs.connectionNameField,list)});
+      new MultiClause(jobs.notificationNameField,list)});
     IResultSet set = database.performQuery("SELECT "+jobs.idField+","+jobs.statusField+" FROM "+
       jobs.getTableName()+" WHERE "+query+" FOR UPDATE",
       newList,null,null);
@@ -496,9 +491,8 @@ public class JobManager implements IJobM
       IResultRow row = set.getRow(i++);
       Long jobID = (Long)row.getValue(jobs.idField);
       int statusValue = jobs.stringToStatus((String)row.getValue(jobs.statusField));
-      jobs.noteConnectorRegistration(jobID,statusValue);
+      jobs.noteNotificationConnectorRegistration(jobID,statusValue);
     }
-    */
   }
 
   /**  Note the deregistration of an output connector used by the specified connections.

Modified: manifoldcf/branches/CONNECTORS-1119/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/Jobs.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1119/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/Jobs.java?rev=1646600&r1=1646599&r2=1646600&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-1119/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/Jobs.java (original)
+++ manifoldcf/branches/CONNECTORS-1119/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/Jobs.java Fri Dec 19 00:53:06 2014
@@ -1491,6 +1491,16 @@ public class Jobs extends org.apache.man
     invalidateCurrentUnregisteredState(jobID,oldStatusValue);
   }
   
+  /** Signal to a job that its underlying notification connector has gone away.
+  *@param jobID is the identifier of the job.
+  *@param oldStatusValue is the current status value for the job.
+  */
+  public void noteNotificationConnectorDeregistration(Long jobID, int oldStatusValue)
+    throws ManifoldCFException
+  {
+    // MHL
+  }
+  
   /** Signal to a job that its underlying connector has gone away.
   *@param jobID is the identifier of the job.
   *@param oldStatusValue is the current status value for the job.
@@ -1531,6 +1541,16 @@ public class Jobs extends org.apache.man
     performUpdate(newValues,"WHERE "+query,list,invKey);
   }
   
+  /** Signal to a job that its underlying notification connector has returned.
+  *@param jobID is the identifier of the job.
+  *@param oldStatusValue is the current status value for the job.
+  */
+  public void noteNotificationConnectorRegistration(Long jobID, int oldStatusValue)
+    throws ManifoldCFException
+  {
+    // MHL
+  }
+
   /** Signal to a job that its underlying connector has returned.
   *@param jobID is the identifier of the job.
   *@param oldStatusValue is the current status value for the job.