Package com.sleepycat.je.dbi

Examples of com.sleepycat.je.dbi.EnvironmentImpl


            /* Run several checkpoints to ensure they occur as expected.  */
            for (int i = 0; i < N_CHECKPOINTS; i += 1) {

                /* Write enough to prompt a checkpoint. */
                EnvironmentImpl envImpl =
                    DbInternal.envGetEnvironmentImpl(env);
                /*
                 * Extra traces are used to account for the fact that the
                 * CheckpointMonitor only activates the Checkpointer every
                 * 1/10 of the checkpoint byte interval.
View Full Code Here


            stats = env.getStats(statsConfig)// read again
            assertEquals(0, stats.getNCheckpoints());

            /* Fill up the log, there should be a checkpoint. */
            String filler = "123456789012345678901245678901234567890123456789";
            EnvironmentImpl envImpl = DbInternal.envGetEnvironmentImpl(env);
            for (int i = 0; i < 20; i++) {
                Tracer.trace(Level.SEVERE, envImpl, filler);
            }
            env.checkpoint(checkpointConfig);
            stats = env.getStats(statsConfig)// read again
View Full Code Here

                verifyConfig.setShowProgressInterval(progressInterval);
                verifyConfig.setShowProgressStream(out);
            }

      openEnv();
            EnvironmentImpl envImpl = DbInternal.envGetEnvironmentImpl(env);
            Tracer.trace(Level.INFO, envImpl,
                         "DbVerify.verify of " + dbName + " starting");

            DatabaseConfig dbConfig = new DatabaseConfig();
            dbConfig.setReadOnly(true);
View Full Code Here

    }

    private void evictAndCheck(boolean shouldEvict, int nKeys)
        throws DatabaseException {

        EnvironmentImpl envImpl = DbInternal.envGetEnvironmentImpl(env);
        MemoryBudget mb = envImpl.getMemoryBudget();

        /*
         * The following batches are run in a single evictMemory() call:
         * 1st eviction will strip DBINs.
         * 2nd will evict DBINs
View Full Code Here

        }

        init(env, dbConfig);

        /* Make the databaseImpl. */
        EnvironmentImpl environmentImpl =
            DbInternal.envGetEnvironmentImpl(envHandle);
        databaseImpl = environmentImpl.createDb(locker,
                                                databaseName,
                                                dbConfig,
                                                this);
        databaseImpl.addReferringHandle(this);
    }
View Full Code Here

         * transactional.  And if non-transactional, that all databases are in
         * the same environment.
         */
        Locker locker = cursors[0].getCursorImpl().getLocker();
        if (!locker.isTransactional()) {
            EnvironmentImpl env = envHandle.getEnvironmentImpl();
            for (int i = 1; i < cursors.length; i += 1) {
                Locker locker2 = cursors[i].getCursorImpl().getLocker();
                if (locker2.isTransactional()) {
                    throw new IllegalArgumentException
                            ("All cursors must use the same transaction.");
                }
                EnvironmentImpl env2 = cursors[i].getDatabaseImpl()
                                                 .getDbEnvironment();
                if (env != env2) {
                    throw new IllegalArgumentException
                            ("All cursors must use the same environment.");
                }
View Full Code Here

     * invalid
     */
    void checkEnv()
        throws RunRecoveryException {

        EnvironmentImpl env = envHandle.getEnvironmentImpl();
        if (env != null) {
            env.checkIfInvalid();
        }
    }
View Full Code Here

     * delete operations.
     */
    private void acquireTriggerListReadLock()
        throws DatabaseException {

        EnvironmentImpl env = envHandle.getEnvironmentImpl();
        env.getTriggerLatch().acquireShared();
        if (triggerList == null) {
            triggerList = new ArrayList();
        }
    }
View Full Code Here

     * Releases a lock acquired by calling acquireTriggerListReadLock().
     */
    private void releaseTriggerListReadLock()
        throws DatabaseException {

        EnvironmentImpl env = envHandle.getEnvironmentImpl();
        env.getTriggerLatch().release();
    }
View Full Code Here

     * must always be called to release the lock.
     */
    private void acquireTriggerListWriteLock()
        throws DatabaseException {

        EnvironmentImpl env = envHandle.getEnvironmentImpl();
        env.getTriggerLatch().acquireExclusive();
        if (triggerList == null) {
            triggerList = new ArrayList();
        }
    }
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.