Package com.sleepycat.je.dbi

Examples of com.sleepycat.je.dbi.DbConfigManager


     */
    public void testBasicUndo()
        throws Throwable {

        try {
            DbConfigManager cm =  envImpl.getConfigManager();
            doTest(50,
                   cm.getInt(EnvironmentParams.LOG_ITERATOR_READ_SIZE),
                   0,
                   false,
                   false);
        } catch (Throwable t) {
            t.printStackTrace();
View Full Code Here


     */
    public RecoveryManager(EnvironmentImpl env)
        throws DatabaseException {

        this.env = env;
        DbConfigManager cm = env.getConfigManager();
        readBufferSize =
            cm.getInt(EnvironmentParams.LOG_ITERATOR_READ_SIZE);
        committedTxnIds = new HashSet();
        abortedTxnIds = new HashSet();
  preparedTxns = new HashMap();
        inListRebuildDbIds = new HashSet();
        fileSummaryLsns = new HashMap();
View Full Code Here

        info = new RecoveryInfo();

        try {
            FileManager fileManager = env.getFileManager();
      DbConfigManager configManager = env.getConfigManager();
      boolean forceCheckpoint =
    configManager.getBoolean
    (EnvironmentParams.ENV_RECOVERY_FORCE_CHECKPOINT);
            if (fileManager.filesExist()) {

                /*
                 * Establish the location of the end of the log. After this, we
View Full Code Here

        this.fileManager = fileManager;
        this.envImpl = envImpl;
        bufferPoolLatch = new Latch(DEBUG_NAME + "_FullLatch", envImpl);

        /* Configure the pool. */
        DbConfigManager configManager = envImpl.getConfigManager();
        runInMemory =
            configManager.getBoolean(EnvironmentParams.LOG_MEMORY_ONLY);
        reset(configManager);

        /* Current buffer is the active buffer that writes go into. */
        currentWriteBuffer = (LogBuffer) bufferPool.getFirst();
    }
View Full Code Here

        this.envImpl = envImpl;
        this.dbEnvHome = dbEnvHome;
        this.readOnly = readOnly;

        /* Read configurations. */
        DbConfigManager configManager = envImpl.getConfigManager();
        maxFileSize = configManager.getLong(EnvironmentParams.LOG_FILE_MAX);

        useNIO =
      configManager.getBoolean(EnvironmentParams.LOG_USE_NIO);
        chunkedNIOSize =
      configManager.getLong(EnvironmentParams.LOG_CHUNKED_NIO);
        boolean directNIO =
            configManager.getBoolean(EnvironmentParams.LOG_DIRECT_NIO);

        if (!useNIO && (chunkedNIOSize > 0 || directNIO)) {
            throw new IllegalArgumentException
                (EnvironmentParams.LOG_USE_NIO.getName() +
                 " is false and therefore " +
View Full Code Here

        throws DatabaseException {

        // Set up log buffers
        this.envImpl = envImpl;
        this.fileManager = envImpl.getFileManager();
        DbConfigManager configManager = envImpl.getConfigManager();
  this.readOnly = readOnly;
        logBufferPool = new LogBufferPool(fileManager, envImpl);

        /* See if we're configured to do a checksum when reading in objects. */
        doChecksumOnRead =
      configManager.getBoolean(EnvironmentParams.LOG_CHECKSUM_READ);
       
        chunkedNIOSize =
      configManager.getLong(EnvironmentParams.LOG_CHUNKED_NIO);

        logWriteLatch = new Latch(DEBUG_NAME, envImpl);
        readBufferSize =
      configManager.getInt(EnvironmentParams.LOG_FAULT_READ_SIZE);
        checkpointMonitor = new CheckpointMonitor(envImpl);
    }
View Full Code Here

     */
    public void setDatabase(DatabaseImpl database) {
        this.database = database;
        maxMainTreeEntriesPerNode = database.getNodeMaxEntries();
        maxDupTreeEntriesPerNode = database.getNodeMaxDupTreeEntries();
        DbConfigManager configManager =
            database.getDbEnvironment().getConfigManager();
    }
View Full Code Here

     * specify the type of the array.
     */
    @SuppressWarnings("unchecked")
    public LockManager(EnvironmentImpl envImpl) {

        DbConfigManager configMgr = envImpl.getConfigManager();
        nLockTables = configMgr.getInt(EnvironmentParams.N_LOCK_TABLES);
        oldLockExceptions =
            configMgr.getBoolean(EnvironmentParams.LOCK_OLD_LOCK_EXCEPTIONS);
        lockTables = new Map[nLockTables];
        lockTableLatches = new Latch[nLockTables];
        for (int i = 0; i < nLockTables; i++) {
            lockTables[i] = new HashMap<Long,Lock>();
            lockTableLatches[i] = new Latch("Lock Table " + i);
View Full Code Here

        this.envImpl = envImpl;
        bufferPoolLatch =
      LatchSupport.makeLatch(DEBUG_NAME + "_FullLatch", envImpl);

        /* Configure the pool. */
        DbConfigManager configManager = envImpl.getConfigManager();
        runInMemory =
            configManager.getBoolean(EnvironmentParams.LOG_MEMORY_ONLY);
        reset(configManager);

        /* Current buffer is the active buffer that writes go into. */
        currentWriteBuffer = (LogBuffer) bufferPool.getFirst();
    }
View Full Code Here

        throws DatabaseException {

        // Set up log buffers
        this.envImpl = envImpl;
        this.fileManager = envImpl.getFileManager();
        DbConfigManager configManager = envImpl.getConfigManager();
  this.readOnly = readOnly;
        logBufferPool = new LogBufferPool(fileManager, envImpl);

        /* See if we're configured to do a checksum when reading in objects. */
        doChecksumOnRead =
      configManager.getBoolean(EnvironmentParams.LOG_CHECKSUM_READ);

        logWriteLatch = LatchSupport.makeLatch(DEBUG_NAME, envImpl);
        readBufferSize =
      configManager.getInt(EnvironmentParams.LOG_FAULT_READ_SIZE);
        checkpointMonitor = new CheckpointMonitor(envImpl);
    }
View Full Code Here

TOP

Related Classes of com.sleepycat.je.dbi.DbConfigManager

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.