KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > derby > iapi > store > access > SortInfo


1 /*
2
3    Derby - Class org.apache.derby.iapi.store.access.SortInfo
4
5    Licensed to the Apache Software Foundation (ASF) under one or more
6    contributor license agreements. See the NOTICE file distributed with
7    this work for additional information regarding copyright ownership.
8    The ASF licenses this file to you under the Apache License, Version 2.0
9    (the "License"); you may not use this file except in compliance with
10    the License. You may obtain a copy of the License at
11
12       http://www.apache.org/licenses/LICENSE-2.0
13
14    Unless required by applicable law or agreed to in writing, software
15    distributed under the License is distributed on an "AS IS" BASIS,
16    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17    See the License for the specific language governing permissions and
18    limitations under the License.
19
20  */

21
22 package org.apache.derby.iapi.store.access;
23
24 import org.apache.derby.iapi.error.StandardException;
25
26 import java.util.Properties JavaDoc;
27
28 /**
29
30   This object provides performance information related to a sort.
31   The information is accumulated during operations on a SortController() and
32   then copied into this object and returned by a call to
33   SortController.getSortInfo().
34
35 **/

36
37 public interface SortInfo
38 {
39     /**
40      * Return all information gathered about the sort.
41      * <p>
42      * This routine returns a list of properties which contains all information
43      * gathered about the sort. If a Property is passed in, then that property
44      * list is appended to, otherwise a new property object is created and
45      * returned.
46      * <p>
47      * Not all sorts may support all properties, if the property is not
48      * supported then it will not be returned. The following is a list of
49      * properties that may be returned:
50      *
51      * sortType
52      * - type of the sort being performed:
53      * internal
54      * external
55      * numRowsInput
56      * - the number of rows input to the sort. This
57      * number includes duplicates.
58      * numRowsOutput
59      * - the number of rows to be output by the sort. This number
60      * may be different from numRowsInput since duplicates may not
61      * be output.
62      * numMergeRuns
63      * - the number of merge runs for the sort.
64      * Applicable to external sorts only.
65      * Note: when a SortController is closed, numMergeRuns may increase by 1, to
66      * reflect the additional merge run that may be created for
67      * any data still in the sort buffer.
68      * mergeRunsSize
69      * - the size (number of rows) of each merge run for the sort.
70      * Applicable to external sorts only.
71      * e.g. [3,3,2] indicates 3 merge runs, where the first two runs
72      * have 3 rows each, and the last run has 2 rows.
73      * Note: when a SortController is closed, this vector may get an
74      * additional element, to reflect the additional merge run that
75      * may be created for any data still in the sort buffer.
76      * NOTE - this list will be expanded as more information about the sort
77      * is gathered and returned.
78      *
79      * @param prop Property list to fill in.
80      *
81      * @exception StandardException Standard exception policy.
82      **/

83     Properties JavaDoc getAllSortInfo(Properties JavaDoc prop)
84         throws StandardException;
85 }
86
Popular Tags