Adding JMCR-Stable version
[Benchmarks_CSolver.git] / JMCR-Stable / real-world application / derby-10.3.2.1 / java / engine / org / apache / derby / iapi / sql / compile / OptimizerFactory.java
diff --git a/JMCR-Stable/real-world application/derby-10.3.2.1/java/engine/org/apache/derby/iapi/sql/compile/OptimizerFactory.java b/JMCR-Stable/real-world application/derby-10.3.2.1/java/engine/org/apache/derby/iapi/sql/compile/OptimizerFactory.java
new file mode 100644 (file)
index 0000000..4ddceeb
--- /dev/null
@@ -0,0 +1,96 @@
+/*\r
+\r
+   Derby - Class org.apache.derby.iapi.sql.compile.OptimizerFactory\r
+\r
+   Licensed to the Apache Software Foundation (ASF) under one or more\r
+   contributor license agreements.  See the NOTICE file distributed with\r
+   this work for additional information regarding copyright ownership.\r
+   The ASF licenses this file to you under the Apache License, Version 2.0\r
+   (the "License"); you may not use this file except in compliance with\r
+   the License.  You may obtain a copy of the License at\r
+\r
+      http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+   Unless required by applicable law or agreed to in writing, software\r
+   distributed under the License is distributed on an "AS IS" BASIS,\r
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+   See the License for the specific language governing permissions and\r
+   limitations under the License.\r
+\r
+ */\r
+\r
+package org.apache.derby.iapi.sql.compile;\r
+\r
+import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;\r
+\r
+import org.apache.derby.iapi.sql.dictionary.DataDictionary;\r
+import org.apache.derby.iapi.store.access.TransactionController;\r
+import org.apache.derby.iapi.services.context.ContextManager;\r
+\r
+import org.apache.derby.iapi.error.StandardException;\r
+\r
+/**\r
+       This is simply the factory for creating an optimizer.\r
+       <p>\r
+       There is expected to be only one of these configured per database.\r
+ */\r
+\r
+public interface OptimizerFactory {\r
+       /**\r
+               Module name for the monitor's module locating system.\r
+        */\r
+       String MODULE = "org.apache.derby.iapi.sql.compile.OptimizerFactory";\r
+\r
+       /**\r
+        * Only one optimizer level should exist in the database, however, the\r
+        * connection may have multiple instances of that optimizer\r
+        * at a given time.\r
+        *\r
+        * @param optimizableList       The list of Optimizables to optimize.\r
+        * @param predicateList The list of unassigned OptimizablePredicates.\r
+        * @param dDictionary   The DataDictionary to use.\r
+        * @param requiredRowOrdering   The required ordering of the rows to\r
+        *                                                              come out of the optimized result set\r
+        * @param numTablesInQuery      The number of tables in the current query\r
+        * @param lcc                   The LanguageConnectionContext\r
+        *\r
+        * RESOLVE - We probably want to pass a subquery list, once we define a\r
+        * new interface for them, so that the Optimizer can out where to attach\r
+        * the subqueries.\r
+        *\r
+        * @exception StandardException         Thrown on error\r
+        */\r
+       public Optimizer getOptimizer( OptimizableList optimizableList,\r
+                                                                 OptimizablePredicateList predicateList,\r
+                                                                 DataDictionary dDictionary,\r
+                                                                 RequiredRowOrdering requiredRowOrdering,\r
+                                                                 int numTablesInQuery,\r
+                                                                 LanguageConnectionContext lcc)\r
+                       throws StandardException;\r
+\r
+\r
+       /**\r
+        * Return a new CostEstimate.\r
+        *\r
+        * @exception StandardException         Thrown on error\r
+        */\r
+       public CostEstimate getCostEstimate()\r
+               throws StandardException;\r
+\r
+       /**\r
+        * Return whether or not the optimizer associated with\r
+        * this factory supports optimizer trace.\r
+        *\r
+        * @return Whether or not the optimizer associated with\r
+        * this factory supports optimizer trace.\r
+        */\r
+       public boolean supportsOptimizerTrace();\r
+\r
+       /**\r
+        * Return the maxMemoryPerTable setting, this is used in\r
+        * optimizer, as well as subquery materialization at run time.\r
+        *\r
+        * @return      maxMemoryPerTable value\r
+        */\r
+       public int getMaxMemoryPerTable();\r
+}\r