001: /*
002:
003: Derby - Class org.apache.derby.impl.store.access.btree.BTreeRowPosition
004:
005: Licensed to the Apache Software Foundation (ASF) under one or more
006: contributor license agreements. See the NOTICE file distributed with
007: this work for additional information regarding copyright ownership.
008: The ASF licenses this file to you under the Apache License, Version 2.0
009: (the "License"); you may not use this file except in compliance with
010: the License. You may obtain a copy of the License at
011:
012: http://www.apache.org/licenses/LICENSE-2.0
013:
014: Unless required by applicable law or agreed to in writing, software
015: distributed under the License is distributed on an "AS IS" BASIS,
016: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017: See the License for the specific language governing permissions and
018: limitations under the License.
019:
020: */
021:
022: package org.apache.derby.impl.store.access.btree;
023:
024: import org.apache.derby.iapi.services.sanity.SanityManager;
025:
026: import org.apache.derby.iapi.store.raw.Page;
027:
028: import org.apache.derby.iapi.store.access.RowUtil;
029:
030: import org.apache.derby.iapi.types.DataValueDescriptor;
031:
032: import org.apache.derby.iapi.types.RowLocation;
033:
034: import org.apache.derby.impl.store.access.conglomerate.RowPosition;
035:
036: /**
037:
038: **/
039:
040: public class BTreeRowPosition extends RowPosition {
041: /**************************************************************************
042: * Fields of the class
043: **************************************************************************
044: */
045: public DataValueDescriptor[] current_positionKey;
046: public long current_scan_pageno;
047: public LeafControlRow current_leaf;
048: protected LeafControlRow next_leaf;
049: public DataValueDescriptor[] current_lock_template;
050: public RowLocation current_lock_row_loc;
051:
052: /**************************************************************************
053: * Constructors for This class:
054: **************************************************************************
055: */
056: public BTreeRowPosition() {
057: super ();
058: }
059:
060: /**************************************************************************
061: * Private/Protected methods of This class:
062: **************************************************************************
063: */
064:
065: /**************************************************************************
066: * Public Methods of This class:
067: **************************************************************************
068: */
069: public void init() {
070: super .init();
071:
072: current_leaf = null;
073: current_positionKey = null;
074: }
075:
076: public final void unlatch() {
077: if (current_leaf != null) {
078: current_leaf.release();
079: current_leaf = null;
080: }
081: current_slot = Page.INVALID_SLOT_NUMBER;
082: }
083:
084: public final String toString() {
085: String ret_string = null;
086:
087: if (SanityManager.DEBUG) {
088: ret_string = super .toString() + "current_positionKey = "
089: + current_positionKey + ";key = "
090: + RowUtil.toString(current_positionKey)
091: + ";current_scan_pageno" + current_scan_pageno
092: + ";next_leaf" + next_leaf + ";current_leaf"
093: + current_leaf;
094: }
095:
096: return (ret_string);
097: }
098:
099: /**************************************************************************
100: * Public Methods of XXXX class:
101: **************************************************************************
102: */
103: }
|