Package org.xtreemfs.babudb.log

Examples of org.xtreemfs.babudb.log.DiskLogger


        }
        Logging.logMessage(Logging.LEVEL_INFO, this, "log replay done, using LSN: " + nextLSN);
       
        // set up and start the disk logger
        try {
            logger = new DiskLogger(configuration.getDbLogDir(), nextLSN, configuration.getSyncMode(),
                configuration.getPseudoSyncWait(), configuration.getMaxQueueLength()
                    * Math.max(1, configuration.getNumThreads()));
            logger.setLifeCycleListener(this);
            logger.start();
            logger.waitForStartup();
View Full Code Here


            if (dbLsn.compareTo(nextLSN) > 0)
                nextLSN = dbLsn;
            Logging.logMessage(Logging.LEVEL_INFO, this, "log replay done, " + "using LSN: " + nextLSN);
           
            try {
                logger = new DiskLogger(configuration.getDbLogDir(), nextLSN, configuration.getSyncMode(),
                    configuration.getPseudoSyncWait(), configuration.getMaxQueueLength()
                        * configuration.getNumThreads());
                logger.setLifeCycleListener(this);
                logger.start();
                logger.waitForStartup();
View Full Code Here

     */
    public void setLogger(DiskLogger logger) {
       
        synchronized (diskLogger) {
           
            DiskLogger old = diskLogger.getAndSet(logger);
            if (logger == null) {
                latestOnDisk = old.getLatestLSN();
            } else {
                diskLogger.notify();
            }
        }
    }
View Full Code Here

    /* (non-Javadoc)
     * @see org.xtreemfs.babudb.api.dev.transaction.TransactionManagerInternal#lockService()
     */
    @Override
    public void lockService() throws InterruptedException {
        DiskLogger logger = diskLogger.get();
        if(logger != null) {
            logger.lock();
        }
    }
View Full Code Here

     * @see org.xtreemfs.babudb.api.dev.transaction.TransactionManagerInternal#unlockService()
     */
    @Override
    public void unlockService() {
       
        DiskLogger logger = diskLogger.get();
        if (logger != null && logger.hasLock()) {
            logger.unlock();
        }
    }
View Full Code Here

    /* (non-Javadoc)
     * @see org.xtreemfs.babudb.api.dev.transaction.TransactionManagerInternal#getLatestOnDiskLSN()
     */
    @Override
    public LSN getLatestOnDiskLSN() {
        DiskLogger logger = diskLogger.get();
        if (logger != null) {
            return logger.getLatestLSN();
        } else {
            return latestOnDisk;
        }
    }
View Full Code Here

TOP

Related Classes of org.xtreemfs.babudb.log.DiskLogger

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.