Package org.chaidb.db.index.btree

Examples of org.chaidb.db.index.btree.BTreePage


        HyperBTreeIterator it = null;
        it = HyperBTreeIterator.createIterator(this, kContext);
        try {
            PageNumber root = getTopRoot();

            BTreePage rootPage = new BTreePage(id, root, btreeSpec, buffer);
            if (rootPage.getPage() == null) {
                return it;
            }
            BTreeNode n = rootPage.search(key, kContext);
            if (n != null) {
                NodePosition firstNode = new NodePosition(n.getPageNumber().getPageNumber(), n.getDataNodeOffset());
                it.initIterator(firstNode);
            }
            // unfix root and leaf page.
View Full Code Here


    //here convert is not performed
    protected void rangeLookupKeys(Key minKey, Key maxKey, boolean includeMinKey, boolean includeMaxKey, PageNumber root, ArrayList values, KernelContext kContext) throws ChaiDBException {

        if (!checkKeyPair(minKey, maxKey)) return;

        BTreePage page;

        if (minKey == null) {
            page = findLeftMostLeaf(root);
        } else {
            page = new BTreePage(id, root, btreeSpec, getBuffer());
            if (page.getPage() != null) {
                page = page.getLeaf(minKey, kContext, BTreePage.SEARCH);
                getBuffer().releasePage(id, root, false);
            }
        }
        if (page.getPage() != null) {
            page.searchKeys(minKey, maxKey, includeMinKey, includeMaxKey, kContext, values);
            // unfix root and leaf page.
            getBuffer().releasePage(id, page.pageNumber, false);
        }

    }
View Full Code Here

TOP

Related Classes of org.chaidb.db.index.btree.BTreePage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.