You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by rh...@apache.org on 2007/04/17 17:57:43 UTC

svn commit: r529654 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/load/Import.java

Author: rhillegas
Date: Tue Apr 17 08:57:42 2007
New Revision: 529654

URL: http://svn.apache.org/viewvc?view=rev&rev=529654
Log:
DERBY-2193: Add comment explaining the usage of a synchronized Hashtable.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/load/Import.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/load/Import.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/load/Import.java?view=diff&rev=529654&r1=529653&r2=529654
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/load/Import.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/load/Import.java Tue Apr 17 08:57:42 2007
@@ -45,6 +45,14 @@
 public class Import extends ImportAbstract{
 
     private static  int                _importCounter;
+
+    //
+    // This hashtable stores Import instances, which keep the context needed
+    // to correlate Derby errors with line numbers in the file that is being
+    // imported. An importing thread will access this hashtable at the very
+    // beginning and the very end of its run. We cannot use Hashmap
+    // because different threads may simultaneously put and delete entries.
+    //
     private static  Hashtable   _importers = new Hashtable();
 
     private String inputFileName;