Package com.sleepycat.je.dbi

Examples of com.sleepycat.je.dbi.EnvironmentImpl


            throw new InvalidAttributeValueException
                ("Attribute value for attribute " + name + " can't be null");
        }

        try {
            EnvironmentImpl envImpl = DbInternal.getEnvironmentImpl(env);
            Level level = Level.parse((String) value);

            if (name.equals(CONSOLEHANDLER_LEVEL)) {
                envImpl.getConsoleHandler().setLevel(level);
            } else if (name.equals(FILEHANDLER_LEVEL)) {
                envImpl.getFileHandler().setLevel(level);
            } else {
                throw new AttributeNotFoundException
                    ("Attribute " + name + " is not valid.");
            }
        } catch (NullPointerException e) {
View Full Code Here


        if (actionName == null) {
            throw new IllegalArgumentException("ActionName can't be null.");
        }

        try {
            EnvironmentImpl envImpl = DbInternal.getEnvironmentImpl(env);

            if (actionName.equals(OP_RESET_LOGGING)) {
                if (params == null || params.length != 2) {
                    return new IllegalArgumentException
                        ("Parameter is not valid");
                }
                envImpl.resetLoggingLevel(((String) params[0]).trim(),
                                          Level.parse((String) params[1]));
                return null;
            }

            return new IllegalArgumentException
View Full Code Here

                        (IN.makeFetchErrorMsg("NULL_LSN without KnownDeleted",
                                              in, lsn, state));
                }
                /* Ignore a NULL_LSN (return null) if KnownDeleted is set. */
            } else {
                EnvironmentImpl envImpl = database.getDbEnvironment();
                try {
                    Node node = (Node) envImpl.getLogManager().getEntry(lsn);
                    node.postFetchInit(database, lsn);
                    target = node;
                    if (in != null) {
                        in.updateMemorySize(null, target);
                    }
View Full Code Here

        throws DatabaseException {

        boolean evictable = false;

        /* To prevent DB open, get a write-lock on the MapLN. */
        EnvironmentImpl envImpl = databaseImpl.getDbEnvironment();
        BasicLocker locker = BasicLocker.createBasicLocker(envImpl);
        DatabaseImpl idDatabaseImpl = envImpl.getDbTree().getIdDatabaseImpl();
        try {
            LockResult lockResult = locker.nonBlockingLock
                (lsn, LockType.WRITE, false /*jumpAheadOfWaiters*/,
                 idDatabaseImpl);

View Full Code Here

        /*
         * We're planning on rolling back past a commit or abort, and we know
         * that we have not passed a barrier checkpoint. See if we have
         * exceeded the number of rolledback commits limit.
         */
        EnvironmentImpl envImpl = repNode.getRepImpl();
        int rollbackTxnLimit  =
            envImpl.getConfigManager().getInt(RepParams.TXN_ROLLBACK_LIMIT);

        if (searchResults.getNumPassedCommits() > rollbackTxnLimit) {

            LoggerUtils.severe(logger, repImpl,
                               "Limited list of transactions that would " +
View Full Code Here

    }

    private ReplicaSyncupReader setupBackwardsReader(VLSN candidateMatchpoint)
        throws IOException {

        EnvironmentImpl envImpl = repNode.getRepImpl();
        int readBufferSize = envImpl.getConfigManager().
            getInt(EnvironmentParams.LOG_ITERATOR_READ_SIZE);
        return new ReplicaSyncupReader
            (envImpl,
             repNode.getVLSNIndex(),
             envImpl.getFileManager().getLastUsedLsn(),
             readBufferSize,
             repNode.getNameIdPair(),
             candidateMatchpoint,
             DbLsn.makeLsn(repNode.getCleanerBarrierFile()0),
             searchResults);
View Full Code Here

    /**
     * Create a BIN by fetching the full version and applying the deltas.
     */
    public BIN reconstituteBIN(DatabaseImpl dbImpl) {

        final EnvironmentImpl envImpl = dbImpl.getDbEnvironment();

        final BIN fullBIN = (BIN)
            envImpl.getLogManager().getEntryHandleFileNotFound(lastFullLsn);

        reconstituteBIN(dbImpl, fullBIN);

        return fullBIN;
    }
View Full Code Here

    public void run() {
        EnvironmentConfig envConfig = new EnvironmentConfig();
        envConfig.setReadOnly(true);
        Environment env = new Environment(envHome, envConfig);
        EnvironmentImpl envImpl = DbInternal.getEnvironmentImpl(env);

        try {
            FileReader reader;
            if (vlsnDump) {
                out.println("Dump VLSNIndex LNs");
View Full Code Here

    }

    private FeederSyncupReader setupReader(VLSN startVLSN)
        throws DatabaseException, IOException {

        EnvironmentImpl envImpl = repNode.getRepImpl();
        int readBufferSize = envImpl.getConfigManager().
            getInt(EnvironmentParams.LOG_ITERATOR_READ_SIZE);

        /*
         * A BackwardsReader for scanning the log file backwards. It must not
         * go past the global CBVLSN, because the log cleaner is allowed to
         * delete anything < the global CBVLSN, even during syncup.
         */
        long lastUsedLsn = envImpl.getFileManager().getLastUsedLsn();
        long finishLsn = DbLsn.makeLsn(repNode.getCleanerBarrierFile(), 0);
        return new FeederSyncupReader(envImpl,
                                      vlsnIndex,
                                      lastUsedLsn,
                                      readBufferSize,
View Full Code Here

        }

        /* Gather up the obsolete LSNs in these file summary LNs. */
        iter = fileNums.iterator();
        Set<Long> obsoleteLsns = new HashSet<Long>();
        EnvironmentImpl envImpl = dbImpl.getDbEnvironment();
        UtilizationProfile profile = envImpl.getUtilizationProfile();

        while (iter.hasNext()) {
            Long fileNum = iter.next();

            PackedOffsets obsoleteOffsets =
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.