KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > derby > impl > store > access > btree > index > B2ICostController


1 /*
2
3    Derby - Class org.apache.derby.impl.store.access.btree.index.B2ICostController
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.impl.store.access.btree.index;
23
24 import java.io.IOException JavaDoc;
25 import java.util.Properties JavaDoc;
26 import org.apache.derby.iapi.services.sanity.SanityManager;
27 import org.apache.derby.iapi.error.StandardException;
28 import org.apache.derby.iapi.store.access.conglomerate.Conglomerate;
29 import org.apache.derby.iapi.store.access.conglomerate.TransactionManager;
30 import org.apache.derby.iapi.store.access.ConglomerateController;
31 import org.apache.derby.iapi.store.access.Qualifier;
32 import org.apache.derby.iapi.types.RowLocation;
33 import org.apache.derby.iapi.store.access.ScanController;
34
35 import org.apache.derby.iapi.store.raw.Transaction;
36
37 import org.apache.derby.impl.store.access.btree.BTreeCostController;
38
39
40 /**
41  * Controller used to provide cost estimates to optimizer about secondary index
42  * data access.
43  *
44  * Implements the StoreCostController interface for the B-Tree index
45  * implementation. The primary use of this interface is to provide costs
46  * used by the query optimizer to use when choosing query plans. Provides
47  * costs of things like fetch one row, how many rows in conglomerate, how
48  * many rows between these 2 keys.
49  *
50  * Note most work of this class is inherited from the generic btree
51  * implementation. This class initializes the top level object and deals with
52  * locking information specific to a secondary index implementation of a btree.
53  */

54 public class B2ICostController extends BTreeCostController
55 {
56     /*
57     ** Fields of B2IController.
58     */

59
60     /*
61     ** Methods of B2IController.
62     */

63
64     B2ICostController()
65     {
66         // Perform the generic b-tree construction.
67
super();
68     }
69
70     void init(
71     TransactionManager xact_manager,
72     B2I conglomerate,
73     Transaction rawtran)
74         throws StandardException
75     {
76         // Do generic b-tree initialization.
77
super.init(xact_manager, conglomerate, rawtran);
78
79         if (SanityManager.DEBUG)
80             SanityManager.ASSERT(conglomerate != null);
81     }
82 }
83
Popular Tags