KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2
3    Derby - Class org.apache.derby.impl.store.access.btree.BTreeRowPosition
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;
23
24
25 import org.apache.derby.iapi.services.sanity.SanityManager;
26
27 import org.apache.derby.iapi.store.raw.Page;
28
29 import org.apache.derby.iapi.store.access.RowUtil;
30
31 import org.apache.derby.iapi.types.DataValueDescriptor;
32
33 import org.apache.derby.iapi.types.RowLocation;
34
35 import org.apache.derby.impl.store.access.conglomerate.RowPosition;
36
37 /**
38
39 **/

40
41 public class BTreeRowPosition extends RowPosition
42 {
43     /**************************************************************************
44      * Fields of the class
45      **************************************************************************
46      */

47     public DataValueDescriptor[] current_positionKey;
48     public long current_scan_pageno;
49     public LeafControlRow current_leaf;
50     protected LeafControlRow next_leaf;
51     public DataValueDescriptor[] current_lock_template;
52     public RowLocation current_lock_row_loc;
53
54     /**************************************************************************
55      * Constructors for This class:
56      **************************************************************************
57      */

58     public BTreeRowPosition()
59     {
60         super();
61     }
62
63     /**************************************************************************
64      * Private/Protected methods of This class:
65      **************************************************************************
66      */

67
68     /**************************************************************************
69      * Public Methods of This class:
70      **************************************************************************
71      */

72     public void init()
73     {
74         super.init();
75
76         current_leaf = null;
77         current_positionKey = null;
78     }
79
80     public final void unlatch()
81     {
82         if (current_leaf != null)
83         {
84             current_leaf.release();
85             current_leaf = null;
86         }
87         current_slot = Page.INVALID_SLOT_NUMBER;
88     }
89
90     public final String JavaDoc toString()
91     {
92         String JavaDoc ret_string = null;
93
94         if (SanityManager.DEBUG)
95         {
96             ret_string =
97                 super.toString() +
98                 "current_positionKey = " + current_positionKey +
99                 ";key = " + RowUtil.toString(current_positionKey) +
100                 ";current_scan_pageno" + current_scan_pageno +
101                 ";next_leaf" + next_leaf +
102                 ";current_leaf" + current_leaf;
103         }
104
105         return(ret_string);
106     }
107
108
109     /**************************************************************************
110      * Public Methods of XXXX class:
111      **************************************************************************
112      */

113 }
114
Popular Tags