manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1601394 - /manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/Jobs.java
Date Mon, 09 Jun 2014 14:36:06 GMT
Author: kwright
Date: Mon Jun  9 14:36:06 2014
New Revision: 1601394

URL: http://svn.apache.org/r1601394
Log:
Get rid of unused code

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

Modified: manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/Jobs.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/Jobs.java?rev=1601394&r1=1601393&r2=1601394&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/Jobs.java
(original)
+++ manifoldcf/branches/CONNECTORS-946/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/Jobs.java
Mon Jun  9 14:36:06 2014
@@ -1159,19 +1159,6 @@ public class Jobs extends org.apache.man
     map.put(processIDField,null);
     performUpdate(map,"WHERE "+query,list,invKey);
     list.clear();
-    query = buildConjunctionClause(list,new ClauseDescription[]{
-      new UnitaryClause(statusField,statusToString(STATUS_ACTIVESEEDING_NOOUTPUT)),
-      new UnitaryClause(processIDField,processID)});
-    map.put(statusField,statusToString(STATUS_ACTIVE_NOOUTPUT));
-    map.put(processIDField,null);
-    performUpdate(map,"WHERE "+query,list,invKey);
-    list.clear();
-    query = buildConjunctionClause(list,new ClauseDescription[]{
-      new UnitaryClause(statusField,statusToString(STATUS_ACTIVESEEDING_NEITHER)),
-      new UnitaryClause(processIDField,processID)});
-    map.put(statusField,statusToString(STATUS_ACTIVE_NEITHER));
-    map.put(processIDField,null);
-    performUpdate(map,"WHERE "+query,list,invKey);
 
   }
 
@@ -1303,18 +1290,6 @@ public class Jobs extends org.apache.man
     map.put(statusField,statusToString(STATUS_ACTIVE_UNINSTALLED));
     map.put(processIDField,null);
     performUpdate(map,"WHERE "+query,list,invKey);
-    list.clear();
-    query = buildConjunctionClause(list,new ClauseDescription[]{
-      new UnitaryClause(statusField,statusToString(STATUS_ACTIVESEEDING_NOOUTPUT))});
-    map.put(statusField,statusToString(STATUS_ACTIVE_NOOUTPUT));
-    map.put(processIDField,null);
-    performUpdate(map,"WHERE "+query,list,invKey);
-    list.clear();
-    query = buildConjunctionClause(list,new ClauseDescription[]{
-      new UnitaryClause(statusField,statusToString(STATUS_ACTIVESEEDING_NEITHER))});
-    map.put(statusField,statusToString(STATUS_ACTIVE_NEITHER));
-    map.put(processIDField,null);
-    performUpdate(map,"WHERE "+query,list,invKey);
 
   }
 
@@ -1465,45 +1440,6 @@ public class Jobs extends org.apache.man
     invalidateCurrentUnregisteredState(jobID,oldStatusValue);
   }
   
-  /*
-    int newStatusValue;
-    // The following states are special, in that when the underlying connector returns, the
jobs
-    // in such states are switched back to their connector-installed value.
-    switch (oldStatusValue)
-    {
-    case STATUS_ACTIVE_NOOUTPUT:
-      newStatusValue = STATUS_ACTIVE;
-      break;
-    case STATUS_ACTIVESEEDING_NOOUTPUT:
-      newStatusValue = STATUS_ACTIVESEEDING;
-      break;
-    case STATUS_ACTIVE_NEITHER:
-      newStatusValue = STATUS_ACTIVE_UNINSTALLED;
-      break;
-    case STATUS_ACTIVESEEDING_NEITHER:
-      newStatusValue = STATUS_ACTIVESEEDING_UNINSTALLED;
-      break;
-    case STATUS_DELETING_NOOUTPUT:
-      newStatusValue = STATUS_DELETING;
-      break;
-    default:
-      newStatusValue = oldStatusValue;
-      break;
-    }
-    if (newStatusValue == oldStatusValue)
-      return;
-
-    StringSet invKey = new StringSet(getJobStatusKey());
-
-    HashMap newValues = new HashMap();
-    newValues.put(statusField,statusToString(newStatusValue));
-    ArrayList list = new ArrayList();
-    String query = buildConjunctionClause(list,new ClauseDescription[]{
-      new UnitaryClause(idField,jobID)});
-    performUpdate(newValues,"WHERE "+query,list,invKey);
-  }
-  */
-  
   /** 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.
@@ -1554,42 +1490,6 @@ public class Jobs extends org.apache.man
     invalidateCurrentUnregisteredState(jobID,oldStatusValue);
   }
   
-  /*
-    int newStatusValue;
-    // The following states are special, in that when the underlying connector returns, the
jobs
-    // in such states are switched back to their connector-installed value.
-    switch (oldStatusValue)
-    {
-    case STATUS_ACTIVE_UNINSTALLED:
-      newStatusValue = STATUS_ACTIVE;
-      break;
-    case STATUS_ACTIVESEEDING_UNINSTALLED:
-      newStatusValue = STATUS_ACTIVESEEDING;
-      break;
-    case STATUS_ACTIVE_NEITHER:
-      newStatusValue = STATUS_ACTIVE_NOOUTPUT;
-      break;
-    case STATUS_ACTIVESEEDING_NEITHER:
-      newStatusValue = STATUS_ACTIVESEEDING_NOOUTPUT;
-      break;
-    default:
-      newStatusValue = oldStatusValue;
-      break;
-    }
-    if (newStatusValue == oldStatusValue)
-      return;
-
-    StringSet invKey = new StringSet(getJobStatusKey());
-
-    HashMap newValues = new HashMap();
-    newValues.put(statusField,statusToString(newStatusValue));
-    ArrayList list = new ArrayList();
-    String query = buildConjunctionClause(list,new ClauseDescription[]{
-      new UnitaryClause(idField,jobID)});
-    performUpdate(newValues,"WHERE "+query,list,invKey);
-  }
-  */
-  
   /** 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.
@@ -1829,20 +1729,6 @@ public class Jobs extends org.apache.man
     map.put(statusField,statusToString(STATUS_ACTIVE_UNINSTALLED));
     map.put(processIDField,null);
     performUpdate(map,"WHERE "+query,list,invKey);
-    list.clear();
-    query = buildConjunctionClause(list,new ClauseDescription[]{
-      new UnitaryClause(statusField,statusToString(STATUS_ACTIVESEEDING_NOOUTPUT)),
-      new UnitaryClause(processIDField,processID)});
-    map.put(statusField,statusToString(STATUS_ACTIVE_NOOUTPUT));
-    map.put(processIDField,null);
-    performUpdate(map,"WHERE "+query,list,invKey);
-    list.clear();
-    query = buildConjunctionClause(list,new ClauseDescription[]{
-      new UnitaryClause(statusField,statusToString(STATUS_ACTIVESEEDING_NEITHER)),
-      new UnitaryClause(processIDField,processID)});
-    map.put(statusField,statusToString(STATUS_ACTIVE_NEITHER));
-    map.put(processIDField,null);
-    performUpdate(map,"WHERE "+query,list,invKey);
 
   }
 
@@ -1915,12 +1801,6 @@ public class Jobs extends org.apache.man
       case STATUS_ACTIVESEEDING_UNINSTALLED:
         newStatus = STATUS_ACTIVE_UNINSTALLED;
         break;
-      case STATUS_ACTIVESEEDING_NOOUTPUT:
-        newStatus = STATUS_ACTIVE_NOOUTPUT;
-        break;
-      case STATUS_ACTIVESEEDING_NEITHER:
-        newStatus = STATUS_ACTIVE_NEITHER;
-        break;
       case STATUS_ACTIVEWAITSEEDING:
         newStatus = STATUS_ACTIVEWAIT;
         break;
@@ -2270,8 +2150,7 @@ public class Jobs extends org.apache.man
 
       HashMap map = new HashMap();
       map.put(statusField,statusToString(newStatus));
-      if (newStatus == STATUS_ACTIVE || newStatus == STATUS_ACTIVE_UNINSTALLED ||
-        newStatus == STATUS_ACTIVE_NOOUTPUT || newStatus == STATUS_ACTIVE_NEITHER)
+      if (newStatus == STATUS_ACTIVE || newStatus == STATUS_ACTIVE_UNINSTALLED)
       {
         map.put(startTimeField,new Long(startTime));
       }
@@ -2342,12 +2221,6 @@ public class Jobs extends org.apache.man
       case STATUS_ACTIVESEEDING_UNINSTALLED:
         newStatus = STATUS_ACTIVE_UNINSTALLED;
         break;
-      case STATUS_ACTIVESEEDING_NOOUTPUT:
-        newStatus = STATUS_ACTIVE_NOOUTPUT;
-        break;
-      case STATUS_ACTIVESEEDING_NEITHER:
-        newStatus = STATUS_ACTIVE_NEITHER;
-        break;
       case STATUS_ACTIVEWAITSEEDING:
         newStatus = STATUS_ACTIVEWAIT;
         break;
@@ -2473,8 +2346,6 @@ public class Jobs extends org.apache.man
     case STATUS_READYFORSTARTUPMINIMAL:
     case STATUS_ACTIVE:
     case STATUS_ACTIVE_UNINSTALLED:
-    case STATUS_ACTIVE_NOOUTPUT:
-    case STATUS_ACTIVE_NEITHER:
     case STATUS_ACTIVEWAIT:
     case STATUS_PAUSING:
     case STATUS_ACTIVEWAITING:
@@ -2487,8 +2358,6 @@ public class Jobs extends org.apache.man
       break;
     case STATUS_ACTIVESEEDING:
     case STATUS_ACTIVESEEDING_UNINSTALLED:
-    case STATUS_ACTIVESEEDING_NOOUTPUT:
-    case STATUS_ACTIVESEEDING_NEITHER:
     case STATUS_ACTIVEWAITSEEDING:
     case STATUS_PAUSINGSEEDING:
     case STATUS_ACTIVEWAITINGSEEDING:
@@ -2546,8 +2415,6 @@ public class Jobs extends org.apache.man
     case STATUS_READYFORSTARTUPMINIMAL:
     case STATUS_ACTIVE:
     case STATUS_ACTIVE_UNINSTALLED:
-    case STATUS_ACTIVE_NOOUTPUT:
-    case STATUS_ACTIVE_NEITHER:
     case STATUS_ACTIVEWAIT:
     case STATUS_PAUSING:
     case STATUS_ACTIVEWAITING:
@@ -2558,8 +2425,6 @@ public class Jobs extends org.apache.man
       break;
     case STATUS_ACTIVESEEDING:
     case STATUS_ACTIVESEEDING_UNINSTALLED:
-    case STATUS_ACTIVESEEDING_NOOUTPUT:
-    case STATUS_ACTIVESEEDING_NEITHER:
     case STATUS_ACTIVEWAITSEEDING:
     case STATUS_PAUSINGSEEDING:
     case STATUS_ACTIVEWAITINGSEEDING:
@@ -2598,8 +2463,6 @@ public class Jobs extends org.apache.man
     {
     case STATUS_ACTIVE:
     case STATUS_ACTIVE_UNINSTALLED:
-    case STATUS_ACTIVE_NOOUTPUT:
-    case STATUS_ACTIVE_NEITHER:
       newStatus = STATUS_PAUSING;
       break;
     case STATUS_ACTIVEWAITING:
@@ -2610,8 +2473,6 @@ public class Jobs extends org.apache.man
       break;
     case STATUS_ACTIVESEEDING:
     case STATUS_ACTIVESEEDING_UNINSTALLED:
-    case STATUS_ACTIVESEEDING_NOOUTPUT:
-    case STATUS_ACTIVESEEDING_NEITHER:
       newStatus = STATUS_PAUSINGSEEDING;
       break;
     case STATUS_ACTIVEWAITINGSEEDING:



Mime
View raw message