01: /*
02:
03: Derby - Class org.apache.derby.iapi.store.access.SortController
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.types.CloneableObject;
25:
26: import org.apache.derby.iapi.types.DataValueDescriptor;
27:
28: import org.apache.derby.iapi.error.StandardException;
29:
30: /**
31:
32: A sort controller is an interface for inserting rows
33: into a sort.
34: <p>
35: A sort is created with the createSort method of
36: TransactionController. The rows are read back with
37: a scan controller returned from the openSortScan
38: method of TranscationController.
39:
40:
41: @see TransactionController#openSort
42: @see ScanController
43:
44: **/
45:
46: public interface SortController {
47: /**
48: Close this sort controller.
49: <p>
50: Currently, since only one sort controller is allowed per sort,
51: closing the sort controller means the last row has been
52: inserted.
53: **/
54: void close();
55:
56: /**
57: Insert a row into the sort.
58:
59: @param row The row to insert into the conglomerate. The stored
60: representations of the row's columns are copied into a new row
61: somewhere in the conglomerate.
62:
63: @exception StandardException Standard exception policy.
64: @see CloneableObject
65: **/
66: void insert(DataValueDescriptor[] row) throws StandardException;
67:
68: /**
69: * Return SortInfo object which contains information about the current
70: * state of the sort.
71: * <p>
72: *
73: * @see SortInfo
74: *
75: * @return The SortInfo object which contains info about current sort.
76: *
77: * @exception StandardException Standard exception policy.
78: **/
79: SortInfo getSortInfo() throws StandardException;
80:
81: }
|