01: /*
02:
03: Derby - Class org.apache.derby.iapi.store.access.conglomerate.Sort
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.conglomerate;
23:
24: import org.apache.derby.iapi.error.StandardException;
25:
26: import org.apache.derby.iapi.store.access.conglomerate.TransactionManager;
27:
28: import org.apache.derby.iapi.store.access.ScanController;
29: import org.apache.derby.iapi.store.access.SortController;
30: import org.apache.derby.iapi.store.access.TransactionController;
31:
32: /**
33:
34: The sort interface corresponds to an instance of an in-progress sort.
35: Sorts are not persistent.
36:
37: **/
38:
39: public interface Sort {
40: /**
41: Open a sort controller.
42: <p>
43: The sort may have been dropped already, in which case
44: this method should thrown an exception.
45:
46: @exception StandardException Standard exception policy.
47: **/
48: SortController open(TransactionManager tran)
49: throws StandardException;
50:
51: /**
52: Open a scan controller.
53: <p>
54: The sort may have been dropped already, in which case
55: this method should thrown an exception.
56:
57: @exception StandardException Standard exception policy.
58: **/
59:
60: ScanController openSortScan(TransactionManager tran, boolean hold)
61: throws StandardException;
62:
63: /**
64: Open a row Source to get rows out of the sorter.
65: <p>
66: The sort may have been dropped already, in which case
67: this method should thrown an exception.
68:
69: @exception StandardException Standard exception policy.
70: **/
71:
72: ScanControllerRowSource openSortRowSource(TransactionManager tran)
73: throws StandardException;
74:
75: /**
76: Drop the sort - this means release all its resources.
77: <p>
78: Note: drop is like close, it has to be tolerant of
79: being called more than once, it must succeed or at
80: least not throw any exceptions.
81: **/
82: void drop(TransactionController tran) throws StandardException;
83: }
|