KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > derby > iapi > store > access > conglomerate > Sort


1 /*
2
3    Derby - Class org.apache.derby.iapi.store.access.conglomerate.Sort
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.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     /**
42     Open a sort controller.
43     <p>
44     The sort may have been dropped already, in which case
45     this method should thrown an exception.
46
47     @exception StandardException Standard exception policy.
48     **/

49     SortController open(TransactionManager tran)
50         throws StandardException;
51
52     /**
53     Open a scan controller.
54     <p>
55     The sort may have been dropped already, in which case
56     this method should thrown an exception.
57
58     @exception StandardException Standard exception policy.
59     **/

60
61     ScanController openSortScan(
62     TransactionManager tran,
63     boolean hold)
64             throws StandardException;
65
66     /**
67     Open a row Source to get rows out of the sorter.
68     <p>
69     The sort may have been dropped already, in which case
70     this method should thrown an exception.
71
72     @exception StandardException Standard exception policy.
73     **/

74
75     ScanControllerRowSource openSortRowSource(TransactionManager tran)
76             throws StandardException;
77
78
79     /**
80     Drop the sort - this means release all its resources.
81     <p>
82     Note: drop is like close, it has to be tolerant of
83     being called more than once, it must succeed or at
84     least not throw any exceptions.
85     **/

86     void drop(TransactionController tran)
87         throws StandardException;
88 }
89
Popular Tags