db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r517221 - in /db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/depend: BasicDependency.java BasicDependencyManager.java
Date Mon, 12 Mar 2007 13:59:15 GMT
Author: djd
Date: Mon Mar 12 06:59:14 2007
New Revision: 517221

URL: http://svn.apache.org/viewvc?view=rev&rev=517221
Log:
DERBY-2380 minor cleanup in dependency manager. No code changes apart from making some
fields final, but added comments to main objects in BasicDependencyManager as my understanding
of the code grows.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/depend/BasicDependency.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/depend/BasicDependencyManager.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/depend/BasicDependency.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/depend/BasicDependency.java?view=diff&rev=517221&r1=517220&r2=517221
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/depend/BasicDependency.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/depend/BasicDependency.java
Mon Mar 12 06:59:14 2007
@@ -78,6 +78,6 @@
 	//
 	// class implementation
 	//
-	protected Provider	provider;
-	protected Dependent	dependent;
+	private final Provider	provider;
+	private final Dependent	dependent;
 }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/depend/BasicDependencyManager.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/depend/BasicDependencyManager.java?view=diff&rev=517221&r1=517220&r2=517221
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/depend/BasicDependencyManager.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/depend/BasicDependencyManager.java
Mon Mar 12 06:59:14 2007
@@ -21,53 +21,34 @@
 
 package org.apache.derby.impl.sql.depend;
 
-import	org.apache.derby.catalog.Dependable;
-import	org.apache.derby.catalog.DependableFinder;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.ListIterator;
 
+import org.apache.derby.catalog.DependableFinder;
+import org.apache.derby.catalog.UUID;
+import org.apache.derby.iapi.error.StandardException;
 import org.apache.derby.iapi.services.context.ContextManager;
-import org.apache.derby.iapi.services.context.ContextService;
-
-import org.apache.derby.iapi.services.monitor.Monitor;
-
+import org.apache.derby.iapi.services.io.FormatableBitSet;
 import org.apache.derby.iapi.services.sanity.SanityManager;
-
 import org.apache.derby.iapi.sql.compile.CompilerContext;
 import org.apache.derby.iapi.sql.compile.Parser;
-import org.apache.derby.impl.sql.compile.CreateViewNode;
-
 import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;
-import org.apache.derby.iapi.sql.conn.LanguageConnectionFactory;
 import org.apache.derby.iapi.sql.conn.StatementContext;
-
-import org.apache.derby.iapi.sql.depend.DependencyManager;
 import org.apache.derby.iapi.sql.depend.Dependency;
+import org.apache.derby.iapi.sql.depend.DependencyManager;
 import org.apache.derby.iapi.sql.depend.Dependent;
 import org.apache.derby.iapi.sql.depend.Provider;
 import org.apache.derby.iapi.sql.depend.ProviderInfo;
 import org.apache.derby.iapi.sql.depend.ProviderList;
-
-import org.apache.derby.iapi.sql.dictionary.DataDescriptorGenerator;
 import org.apache.derby.iapi.sql.dictionary.DataDictionary;
 import org.apache.derby.iapi.sql.dictionary.DependencyDescriptor;
+import org.apache.derby.iapi.sql.dictionary.SchemaDescriptor;
 import org.apache.derby.iapi.sql.dictionary.TableDescriptor;
 import org.apache.derby.iapi.sql.dictionary.ViewDescriptor;
-import org.apache.derby.iapi.sql.dictionary.SchemaDescriptor;
-
-import org.apache.derby.impl.sql.catalog.DDColumnDependableFinder;
 import org.apache.derby.iapi.store.access.TransactionController;
-
-import org.apache.derby.catalog.UUID;
-import org.apache.derby.iapi.reference.SQLState;
-import org.apache.derby.iapi.services.io.FormatableBitSet;
-
-import org.apache.derby.iapi.reference.MessageId;
-
-import org.apache.derby.iapi.error.StandardException;
-
-import java.util.Hashtable;
-import java.util.Enumeration;
-import java.util.ListIterator;
-import java.util.List;
+import org.apache.derby.impl.sql.compile.CreateViewNode;
 
 /**
 	The dependency manager tracks needs that dependents have of providers.
@@ -79,6 +60,33 @@
      * DataDictionary for this database.
      */
     private final DataDictionary dd;
+    
+    /**
+     * Map of in-memory dependencies for Dependents.
+     * In-memory means that one or both of the Dependent
+     * or Provider are non-persistent (isPersistent() returns false).
+     * 
+     * Key is the UUID of the Dependent (from getObjectID()).
+     * Value is a List containing Dependency objects, each
+     * of whihc links the same Dependent to a Provider.
+     * Dependency objects in the List are unique.
+     * 
+     */
+    private final Hashtable dependents = new Hashtable();
+    
+    /**
+     * Map of in-memory dependencies for Providers.
+     * In-memory means that one or both of the Dependent
+     * or Provider are non-persistent (isPersistent() returns false).
+     * 
+     * Key is the UUID of the Provider (from getObjectID()).
+     * Value is a List containing Dependency objects, each
+     * of which links the same Provider to a Dependent.
+     * Dependency objects in the List are unique.
+     * 
+     */    
+    private final Hashtable providers = new Hashtable();
+
 
 	//
 	// DependencyManager interface
@@ -1369,8 +1377,4 @@
 	private static List newSList(List list) {
 		return java.util.Collections.synchronizedList(new java.util.LinkedList(list));
 	}
-
-	private	DataDictionary dataDictionary = null;
-	protected Hashtable dependents = new Hashtable();
-	protected Hashtable providers = new Hashtable();
 }



Mime
View raw message