Package org.chaidb.db.log.logrecord

Examples of org.chaidb.db.log.logrecord.BTreeSpecLogRecord


            if (oldPage == null) {
                oldPage = new PageNumber(BTreeSpec.INVALID_PAGENO);
            }

            if (oldPage.getPageNumber() != newPage.getPageNumber()) {
                BTreeSpecLogRecord logRec = new BTreeSpecLogRecord(treeid, oldPage.getPageNumber(), newPage.getPageNumber(), BTreeSpecLogRecord.LATEST_DATA_PAGE_NUMBER_FLAG, uid, docid, ob.btree.getType());
                logRec.log();
            }

            if (Debug.DEBUG_RESOURCE_CONTROL_BLOCK) {
                logger.fatal(Integer.toHexString(uid) + " New LDP" + newPage.toHexString());
            }
View Full Code Here


            if (oldPage == null) {
                oldPage = new PageNumber(BTreeSpec.INVALID_PAGENO);
            }

            if (!oldPage.equ(pNumber)) {
                BTreeSpecLogRecord logRec = new BTreeSpecLogRecord(pNumber.getTreeId(), oldPage.getPageNumber(), pNumber.getPageNumber(), BTreeSpecLogRecord.LATEST_DATA_PAGE_NUMBER_FLAG, uid, docid, ob.btree.getType());
                logRec.log();
            }
        }
View Full Code Here

        }
    }

    public void updateRootOnMetaPage(PageNumber root, KernelContext kContext) throws ChaiDBException {
        if (kContext != null && kContext.getNeedLog()) {
            BTreeSpecLogRecord logRec = new BTreeSpecLogRecord(id, getBTreeSpec().getRootPageNumber().getPageNumber(), root.getPageNumber(), BTreeSpecLogRecord.ROOT_PAGE_NUMBER_FLAG, kContext.getLocker(), getType());
            logRec.log();
        }
        getBTreeSpec().setRootPageNumber(root);
    }
View Full Code Here

        }

        p = new PageNumber(oldPageNumber);
        p.add(1);
        if (kc != null && kc.getNeedLog()) {
            BTreeSpecLogRecord logRec = new BTreeSpecLogRecord(btree.getBtreeId(), pageNumber.getPageNumber(), p.getPageNumber(), BTreeSpecLogRecord.PAGE_NUMBER_FLAG, kc.getLocker(), btree.getType());
            logRec.log();
        }
        pageNumber.setPageNumber(p);
        return oldPageNumber;
    }
View Full Code Here

          but if btree is already created, and reopen (e.g. create index, shut down sever, and restart server)
          I'd prefer to control it at upper level, createIndex
        */

        if (kc != null && kc.getNeedLog()) {
            BTreeSpecLogRecord logRec = new BTreeSpecLogRecord(btree.getBtreeId(), internalNodeSize, nodeSize, BTreeSpecLogRecord.NODE_SIZE_FLAG, kc.getLocker(), btree.getType());
            logRec.log();
        }
    }
View Full Code Here

     * @throws ChaiDBException
     */
    public void setLayer(byte layers, KernelContext kc) throws ChaiDBException {
        if (layers > 0 && layers != this.layers) {
            if (kc != null && kc.getNeedLog()) {
                BTreeSpecLogRecord logRec = new BTreeSpecLogRecord(btree.getBtreeId(), this.layers, layers, BTreeSpecLogRecord.LAYER_FLAG, kc.getLocker(), btree.getType());
                logRec.log();
            }
            this.layers = layers;
        }
    }
View Full Code Here

            else subRoot = null;

        }

        if (needLog) {
            BTreeSpecLogRecord logRec = new BTreeSpecLogRecord(id, subRoot == null ? -1 : subRoot.getPageNumber(), docRoot.getPageNumber(), BTreeSpecLogRecord.DOC_ROOT_PAGE_NUMBER_FLAG, txnId, docID, IDBIndex.ID2NODE_BTREE);
            logRec.log();
        }

        docRoot.setTreeId(id);
        if (subRoot == null) id2root.put(idocID, docRoot);
        else subRoot.setPageNumber(docRoot);
View Full Code Here

TOP

Related Classes of org.chaidb.db.log.logrecord.BTreeSpecLogRecord

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.