Author: kwright
Date: Thu May 22 00:45:03 2014
New Revision: 1596718
URL: http://svn.apache.org/r1596718
Log:
Fix for CONNECTORS-942
Modified:
manifoldcf/trunk/CHANGES.txt
manifoldcf/trunk/framework/agents/src/main/java/org/apache/manifoldcf/agents/incrementalingest/IncrementalIngester.java
manifoldcf/trunk/framework/agents/src/main/java/org/apache/manifoldcf/agents/interfaces/IOutputConnector.java
manifoldcf/trunk/framework/agents/src/main/java/org/apache/manifoldcf/agents/output/BaseOutputConnector.java
Modified: manifoldcf/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/manifoldcf/trunk/CHANGES.txt?rev=1596718&r1=1596717&r2=1596718&view=diff
==============================================================================
--- manifoldcf/trunk/CHANGES.txt (original)
+++ manifoldcf/trunk/CHANGES.txt Thu May 22 00:45:03 2014
@@ -3,6 +3,10 @@ $Id$
======================= 1.7-dev =====================
+CONNECTORS-942: Add output connector method to handle notification
+of removal of all connection-related records.
+(Karl Wright)
+
CONNECTORS-940: Upgrade slf4j and commons-logging to latest versions.
(Karl Wright)
Modified:
manifoldcf/trunk/framework/agents/src/main/java/org/apache/manifoldcf/agents/incrementalingest/IncrementalIngester.java
URL:
http://svn.apache.org/viewvc/manifoldcf/trunk/framework/agents/src/main/java/org/apache/manifoldcf/agents/incrementalingest/IncrementalIngester.java?rev=1596718&r1=1596717&r2=1596718&view=diff
==============================================================================
---
manifoldcf/trunk/framework/agents/src/main/java/org/apache/manifoldcf/agents/incrementalingest/IncrementalIngester.java
(original)
+++
manifoldcf/trunk/framework/agents/src/main/java/org/apache/manifoldcf/agents/incrementalingest/IncrementalIngester.java
Thu May 22 00:45:03 2014
@@ -1396,11 +1396,27 @@ public class IncrementalIngester extends
public void removeOutputConnection(String outputConnectionName)
throws ManifoldCFException
{
+ IOutputConnection connection =
connectionManager.load(outputConnectionName);
+
ArrayList list = new ArrayList();
String query = buildConjunctionClause(list,new ClauseDescription[]{
new UnitaryClause(outputConnNameField,outputConnectionName)});
performDelete("WHERE "+query,list,null);
+
+ // Notify the output connection of the removal of all the records for the
connection
+ IOutputConnector connector = outputConnectorPool.grab(connection);
+ if (connector == null)
+ return;
+ try
+ {
+ connector.noteAllRecordsRemoved();
+ }
+ finally
+ {
+ outputConnectorPool.release(connection,connector);
+ }
+
}
/** Note the ingestion of a document, or the "update" of a document.
Modified:
manifoldcf/trunk/framework/agents/src/main/java/org/apache/manifoldcf/agents/interfaces/IOutputConnector.java
URL:
http://svn.apache.org/viewvc/manifoldcf/trunk/framework/agents/src/main/java/org/apache/manifoldcf/agents/interfaces/IOutputConnector.java?rev=1596718&r1=1596717&r2=1596718&view=diff
==============================================================================
---
manifoldcf/trunk/framework/agents/src/main/java/org/apache/manifoldcf/agents/interfaces/IOutputConnector.java
(original)
+++
manifoldcf/trunk/framework/agents/src/main/java/org/apache/manifoldcf/agents/interfaces/IOutputConnector.java
Thu May 22 00:45:03 2014
@@ -160,6 +160,13 @@ public interface IOutputConnector extend
public void noteJobComplete(IOutputNotifyActivity activities)
throws ManifoldCFException, ServiceInterruption;
+ /** Notify the connector that all records associated with this connection
have been removed.
+ * This method allows the connector to remove any internal data storage that
is associated with records sent to the index on
+ * behalf of a connection. It should not attempt to communicate with the
output index.
+ */
+ public void noteAllRecordsRemoved()
+ throws ManifoldCFException;
+
// UI support methods.
//
// These support methods come in two varieties. The first bunch (inherited
from IConnector) is involved in setting up connection configuration information.
Modified:
manifoldcf/trunk/framework/agents/src/main/java/org/apache/manifoldcf/agents/output/BaseOutputConnector.java
URL:
http://svn.apache.org/viewvc/manifoldcf/trunk/framework/agents/src/main/java/org/apache/manifoldcf/agents/output/BaseOutputConnector.java?rev=1596718&r1=1596717&r2=1596718&view=diff
==============================================================================
---
manifoldcf/trunk/framework/agents/src/main/java/org/apache/manifoldcf/agents/output/BaseOutputConnector.java
(original)
+++
manifoldcf/trunk/framework/agents/src/main/java/org/apache/manifoldcf/agents/output/BaseOutputConnector.java
Thu May 22 00:45:03 2014
@@ -211,6 +211,16 @@ public abstract class BaseOutputConnecto
// Does nothing in the base class
}
+ /** Notify the connector that all records associated with this connection
have been removed.
+ * This method allows the connector to remove any internal data storage that
is associated with records sent to the index on
+ * behalf of a connection. It should not attempt to communicate with the
output index.
+ */
+ public void noteAllRecordsRemoved()
+ throws ManifoldCFException
+ {
+ // Does nothing in the base class
+ }
+
// UI support methods.
//
// These support methods come in two varieties. The first bunch is involved
in setting up connection configuration information. The second bunch