01: /*
02:
03: Derby - Class org.apache.derby.iapi.store.access.SortInfo
04:
05: Licensed to the Apache Software Foundation (ASF) under one or more
06: contributor license agreements. See the NOTICE file distributed with
07: this work for additional information regarding copyright ownership.
08: The ASF licenses this file to you under the Apache License, Version 2.0
09: (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;
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: * Return all information gathered about the sort.
40: * <p>
41: * This routine returns a list of properties which contains all information
42: * gathered about the sort. If a Property is passed in, then that property
43: * list is appended to, otherwise a new property object is created and
44: * returned.
45: * <p>
46: * Not all sorts may support all properties, if the property is not
47: * supported then it will not be returned. The following is a list of
48: * properties that may be returned:
49: *
50: * sortType
51: * - type of the sort being performed:
52: * internal
53: * external
54: * numRowsInput
55: * - the number of rows input to the sort. This
56: * number includes duplicates.
57: * numRowsOutput
58: * - the number of rows to be output by the sort. This number
59: * may be different from numRowsInput since duplicates may not
60: * be output.
61: * numMergeRuns
62: * - the number of merge runs for the sort.
63: * Applicable to external sorts only.
64: * Note: when a SortController is closed, numMergeRuns may increase by 1, to
65: * reflect the additional merge run that may be created for
66: * any data still in the sort buffer.
67: * mergeRunsSize
68: * - the size (number of rows) of each merge run for the sort.
69: * Applicable to external sorts only.
70: * e.g. [3,3,2] indicates 3 merge runs, where the first two runs
71: * have 3 rows each, and the last run has 2 rows.
72: * Note: when a SortController is closed, this vector may get an
73: * additional element, to reflect the additional merge run that
74: * may be created for any data still in the sort buffer.
75: * NOTE - this list will be expanded as more information about the sort
76: * is gathered and returned.
77: *
78: * @param prop Property list to fill in.
79: *
80: * @exception StandardException Standard exception policy.
81: **/
82: Properties getAllSortInfo(Properties prop) throws StandardException;
83: }
|