--- /dev/null
+/*\r
+\r
+ Derby - Class org.apache.derby.iapi.store.access.SortInfo\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.store.access;\r
+\r
+import org.apache.derby.iapi.error.StandardException;\r
+\r
+import java.util.Properties;\r
+\r
+/**\r
+\r
+ This object provides performance information related to a sort.\r
+ The information is accumulated during operations on a SortController() and\r
+ then copied into this object and returned by a call to\r
+ SortController.getSortInfo().\r
+\r
+**/\r
+\r
+public interface SortInfo\r
+{\r
+ /**\r
+ * Return all information gathered about the sort.\r
+ * <p>\r
+ * This routine returns a list of properties which contains all information\r
+ * gathered about the sort. If a Property is passed in, then that property\r
+ * list is appended to, otherwise a new property object is created and\r
+ * returned.\r
+ * <p>\r
+ * Not all sorts may support all properties, if the property is not\r
+ * supported then it will not be returned. The following is a list of\r
+ * properties that may be returned:\r
+ *\r
+ * sortType\r
+ * - type of the sort being performed:\r
+ * internal\r
+ * external\r
+ * numRowsInput\r
+ * - the number of rows input to the sort. This\r
+ * number includes duplicates.\r
+ * numRowsOutput\r
+ * - the number of rows to be output by the sort. This number\r
+ * may be different from numRowsInput since duplicates may not\r
+ * be output.\r
+ * numMergeRuns\r
+ * - the number of merge runs for the sort.\r
+ * Applicable to external sorts only.\r
+ * Note: when a SortController is closed, numMergeRuns may increase by 1, to\r
+ * reflect the additional merge run that may be created for\r
+ * any data still in the sort buffer.\r
+ * mergeRunsSize\r
+ * - the size (number of rows) of each merge run for the sort.\r
+ * Applicable to external sorts only.\r
+ * e.g. [3,3,2] indicates 3 merge runs, where the first two runs\r
+ * have 3 rows each, and the last run has 2 rows.\r
+ * Note: when a SortController is closed, this vector may get an\r
+ * additional element, to reflect the additional merge run that\r
+ * may be created for any data still in the sort buffer.\r
+ * NOTE - this list will be expanded as more information about the sort\r
+ * is gathered and returned.\r
+ *\r
+ * @param prop Property list to fill in.\r
+ *\r
+ * @exception StandardException Standard exception policy.\r
+ **/\r
+ Properties getAllSortInfo(Properties prop)\r
+ throws StandardException;\r
+}\r