Examples of LSN


Examples of org.chaidb.db.log.Lsn

     */
    public Lsn log(int flag) throws ChaiDBException {
        super.log();
        LogManager logMgr = Db.getLogManager();

        Lsn newLsn;
        if (flag == Transaction.TXN_SYNC) {
            newLsn = logMgr.put(this, LogManager.LOG_FLUSH);//flush log to log file while commit
        } else {
            newLsn = logMgr.put(this, LogManager.LOG_DATA);//not flush log to log file,just put it to log buffer
        }
View Full Code Here

Examples of org.chaidb.db.log.Lsn

        }

        super.log();

        LogManager logMgr = Db.getLogManager();
        Lsn newLsn = null;

        //        if (operationFlag == FILE_DELETE_OPERATION) {
        //            newLsn = logMgr.put(this, LogManager.LOG_FLUSH);//flush log to log file while do delete collection/index operation
        //        } else {
        //            newLsn = logMgr.put(this, LogManager.LOG_DATA);//not flush log to log file,just put it to log buffer
View Full Code Here

Examples of org.chaidb.db.log.Lsn

            return null;
        }

        super.log();
        LogManager logMgr = Db.getLogManager();
        Lsn newLsn = logMgr.put(this, LogManager.LOG_FLUSH);

        return newLsn;
    }
View Full Code Here

Examples of org.chaidb.db.log.Lsn

    /**
     * Default Constructor
     */
    public TxnFuzzyCkpLogRecord() {
        super();
        smallestLsn = new Lsn();
        super.setType(LOG_TXN_FUZZY_CHECKPOINT);
    }
View Full Code Here

Examples of org.chaidb.db.log.Lsn

     */
    public Lsn getSmallestLsn() {
        if (smallestLsn == null) {
            return null;
        }
        return new Lsn(smallestLsn);
    }
View Full Code Here

Examples of org.chaidb.db.log.Lsn

     * 1.find smallest begin_lsn of all active txns
     * 2.add fuzzy checkpoint log record
     * 3.flush btrees
     */
    public void doCheckpoint(boolean sync) throws ChaiDBException {
        Lsn lastCkp = null;
        Lsn ckpLsn = null;
        Lsn smallestLsn = txnManager.getSmallestLsnOfAllActiveTxn();

        if (!sync && !txnManager.getLogManager().needCheckpoint()) {
            txnManager.setTimeCkp(System.currentTimeMillis());

            logger.info("Checkpoint thread found there is no new log from " + "the time of last checkpoint. Current checkpoint " + "process will abort.");
View Full Code Here

Examples of org.chaidb.db.log.Lsn

    /**
     * Default Constructor
     */
    public TxnCkpLogRecord() {
        super();
        lastCkpLsn = new Lsn();
        super.setType(LOG_TXN_CHECKPOINT);
    }
View Full Code Here

Examples of org.chaidb.db.log.Lsn

     */
    public Lsn getLastCkpLsn() {
        if (lastCkpLsn == null) {
            return null;
        }
        return new Lsn(lastCkpLsn);
    }
View Full Code Here

Examples of org.chaidb.db.log.Lsn

     * user interface to add a log record and put it to buffer pool
     */
    public Lsn log() throws ChaiDBException {
        super.log();
        LogManager logMgr = Db.getLogManager();
        Lsn newLsn = logMgr.put(this, LogManager.LOG_CHECKPOINT);

        return newLsn;
    }
View Full Code Here

Examples of org.chaidb.db.log.Lsn

    /**
     * Default Constructor
     */
    public TxnChildLogRecord() {
        super();
        lastLsnOfChildTxn = new Lsn();
        super.setType(LOG_TXN_CHILD);
    }
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.