Examples of EnvironmentImpl


Examples of com.sleepycat.je.dbi.EnvironmentImpl

            h.publish(record);
        }
    }

    private Handler getEnvSpecificConfiguredHandler() {
        EnvironmentImpl envImpl =
            LoggerUtils.envMap.get(Thread.currentThread());

        /*
         * Prefer to lose logging output, rather than risk a
         * NullPointerException if the caller forgets to set and release the
         * environmentImpl.
         */
        if (envImpl == null) {
            return null;
        }

        return envImpl.getConfiguredHandler();
    }
View Full Code Here

Examples of com.sleepycat.je.dbi.EnvironmentImpl

                            long truncFileNum,
                            long truncOffset)
        throws IOException {

        /* Make a read/write environment */
        EnvironmentImpl envImpl =
            CmdUtil.makeUtilityEnvironment(env, false);
       
        /* Go through the file manager to get the JE file. Truncate. */
        envImpl.getFileManager().truncateLog(truncFileNum, truncOffset);

        envImpl.close();
    }
View Full Code Here

Examples of com.sleepycat.je.dbi.EnvironmentImpl

        if (progressInterval > 0) {
            verifyConfig.setShowProgressInterval(progressInterval);
            verifyConfig.setShowProgressStream(out);
        }

        EnvironmentImpl envImpl = DbInternal.getEnvironmentImpl(env);

        /* If no database is specified, verify all. */
        List<String> dbNameList = null;
        List<String> internalDbs = null;
        DbTree dbMapTree = envImpl.getDbTree();

        if (dbName == null) {
            dbNameList = env.getDatabaseNames();

            dbNameList.addAll(dbMapTree.getInternalNoRepDbNames());
            if (envImpl.isReplicated()) {
                dbNameList.addAll(dbMapTree.getInternalRepDbNames());
            }
            internalDbs = dbMapTree.getInternalNoLookupDbNames();
        } else {
            dbNameList = new ArrayList<String>();
View Full Code Here

Examples of com.sleepycat.je.dbi.EnvironmentImpl

                } else {
                    printUsageAndExit("Unknown argument: " + nextArg);
                }
            }

            final EnvironmentImpl envImpl =
                CmdUtil.makeUtilityEnvironment(envHome, true /*readOnly*/);
            final DbVerifyLog verifier = new DbVerifyLog(envImpl, 0);
            verifier.verify(startFile, endFile);
            System.exit(0);
        } catch (Throwable e) {
View Full Code Here

Examples of com.sleepycat.je.dbi.EnvironmentImpl

            if (state != ReplicatedEnvironment.State.DETACHED) {
                throw EnvironmentFailureException.unexpectedState
                    ("joinState=" + state);
            }

            EnvironmentImpl envImpl =
                DbInternal.getEnvironmentImpl(rep);
            VLSNIndex vlsnIndex =
                RepInternal.getRepImpl(rep).getVLSNIndex();
            if (forward) {
                startLsn = DbLsn.NULL_LSN;
            } else {
                startLsn = envImpl.getFileManager().getLastUsedLsn();
            }

            int readBufferSize =
                envImpl.getConfigManager().getInt
                (EnvironmentParams.LOG_ITERATOR_READ_SIZE);
            FeederReader feederReader = null;
            FeederSyncupReader backwardsReader = null;

            VLSN scanVLSN = startVLSN;
View Full Code Here

Examples of com.sleepycat.je.dbi.EnvironmentImpl

            rootLatch.release();
        }

        if (subtreeRootIN != null) {

            EnvironmentImpl envImpl = database.getDbEnvironment();
            if (rootNeedsUpdating) {

                /*
                 * modifyDbRoot will grab locks and we can't have the INList
                 * latches or root latch held while it tries to acquire locks.
                 */
                DbTree dbTree = envImpl.getDbTree();
                dbTree.optionalModifyDbRoot(database);
                RecoveryManager.traceRootDeletion
                    (envImpl.getLogger(), database);
            }

            /*
             * Count obsolete nodes after logging the delete. We can do
             * this without having the nodes of the subtree latched because the
             * subtree has been detached from the tree.
             */
            INList inList = envImpl.getInMemoryINs();
            accountForSubtreeRemoval(inList, subtreeRootIN, localTracker);
        }
    }
View Full Code Here

Examples of com.sleepycat.je.dbi.EnvironmentImpl

    private boolean cascadeUpdates(ArrayList<SplitInfo> nodeLadder, int index)
        throws DatabaseException {

        ListIterator<SplitInfo> iter =
            nodeLadder.listIterator(nodeLadder.size());
        EnvironmentImpl envImpl = database.getDbEnvironment();
        LogManager logManager = envImpl.getLogManager();

        long newLsn = DbLsn.NULL_LSN;
        SplitInfo info = null;
        while (iter.hasPrevious()) {
            info = iter.previous();
View Full Code Here

Examples of com.sleepycat.je.dbi.EnvironmentImpl

        /*
         * 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(cacheMode);
        long curRootLsn = 0;
View Full Code Here

Examples of com.sleepycat.je.dbi.EnvironmentImpl

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

Examples of com.sleepycat.je.dbi.EnvironmentImpl

                        rootLatchIsHeld = false;
                        continue;
                    }

                    final CacheMode cacheMode = cursor.getCacheMode();
                    final EnvironmentImpl env = database.getDbEnvironment();
                    final LogManager logManager = env.getLogManager();
                    final INList inMemoryINs = env.getInMemoryINs();

                    /*
                     * This is an empty tree, either because it's brand new
                     * tree or because everything in it was deleted. Create an
                     * IN and a BIN.  We could latch the rootIN here, but
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.