Package org.chaidb.db.log.logrecord

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


                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


                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();
            }
        }

        /**
         * Release all resources occupied by this txn after it ends
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);
    }

    public Object decodeFromByteArray(byte[] bytes, Key key) throws ChaiDBException {
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

          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();
        }
    }

    /**
     * Set layer of a BTree. This is only called when this BTree is firstly created!
View Full Code Here

     */
    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

        }

        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
Copyright © 2018 www.massapi.com. 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.