Package com.sleepycat.je.dbi

Examples of com.sleepycat.je.dbi.EnvironmentImpl


        TestUtils.removeFiles("Setup", envHome, FileManager.JE_SUFFIX);
 
  EnvironmentConfig envConfig = TestUtils.initEnvConfig();
  envConfig.setConfigParam(EnvironmentParams.NODE_MAX.getName(), "6");
        envConfig.setAllowCreate(true);
        env = new EnvironmentImpl(envHome, envConfig);
    }
View Full Code Here


                             UtilizationTracker tracker)
        throws DatabaseException {

        boolean ret = true;

  EnvironmentImpl env = database.getDbEnvironment();
        INList inMemoryINs = env.getInMemoryINs();

        IN in = search
            (dupKey, SearchType.NORMAL, -1, null, true /*updateGeneration*/);

        assert in.isLatchOwner();
View Full Code Here

        /*
         * Create a new root IN, insert the current root IN into it, and then
         * call split.
         */
        EnvironmentImpl env = database.getDbEnvironment();
        LogManager logManager = env.getLogManager();
        INList inMemoryINs = env.getInMemoryINs();

        IN curRoot = null;
        curRoot = (IN) root.fetchTarget(database, null);
        curRoot.latch();
        long curRootLsn = 0;
View Full Code Here

                         * DbTree.db lock, no problem.  The latest root will
                         * still get written out.
                         */
                        rootLatch.release();
                        rootLatched = false;
                        EnvironmentImpl env = database.getDbEnvironment();
                        env.getDbMapTree().modifyDbRoot(database);
                        rootLatch.acquire();
                        rootLatched = true;
                        rootIN = (IN) root.fetchTarget(database, null);
                    }
                    rootIN.latch();
View Full Code Here

        LockResult lnLock)
        throws DatabaseException {

        validateInsertArgs(allowDuplicates);

        EnvironmentImpl env = database.getDbEnvironment();
        LogManager logManager = env.getLogManager();
        INList inMemoryINs = env.getInMemoryINs();

        /* Find and latch the relevant BIN. */
        BIN bin = null;
        try {
            bin = findBinForInsert(key, logManager, inMemoryINs, cursor);
View Full Code Here

                                    INList inMemoryINs,
                                    CursorImpl cursor,
            LockResult lnLock)
        throws DatabaseException {

        EnvironmentImpl env = database.getDbEnvironment();
  int index = cursor.getIndex();
        boolean successfulInsert = false;

        DIN duplicateRoot = null;
        Node n = bin.fetchTarget(index);
View Full Code Here

        DIN curRoot = (DIN) bin.fetchTarget(index);

        if (curRoot.needsSplitting()) {

            EnvironmentImpl env = database.getDbEnvironment();
            LogManager logManager = env.getLogManager();
            INList inMemoryINs = env.getInMemoryINs();

            /*
             * Make a new root DIN, giving it an id key from the previous root.
             */
            byte[] rootIdKey = curRoot.getKey(0);
View Full Code Here

                                    INList inMemoryINs,
                                    LN newLN,
                                    CursorImpl cursor)
        throws DatabaseException {

        EnvironmentImpl env = database.getDbEnvironment();
        DIN duplicateRoot = null;
        DBIN duplicateBin = null;
        BIN bin = cursor.getBIN();
        int index = cursor.getIndex();
View Full Code Here

        envConfig.setConfigParam(EnvironmentParams.NODE_MAX.getName(), "6");
        envConfig.setConfigParam
      (EnvironmentParams.LOG_FILE_MAX.getName(), "1000");

        envConfig.setAllowCreate(true);
        env = new EnvironmentImpl(envHome, envConfig);
        fileManager = env.getFileManager();
        logManager = env.getLogManager();

        logAndRetrieve();
        env.close();
View Full Code Here

            envConfig.setAllowCreate(true);

            /*
       * Recreate the file manager and log manager w/different configs.
       */
            env = new EnvironmentImpl(envHome, envConfig);
            fileManager = env.getFileManager();
            logManager = env.getLogManager();

            logAndRetrieve();

View Full Code Here

TOP

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

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.