Package com.sleepycat.je.dbi

Examples of com.sleepycat.je.dbi.DatabaseImpl


    }

    void ensureMember(RepNodeImpl ensureNode)
        throws DatabaseException {

        DatabaseImpl groupDbImpl;
        try {
            groupDbImpl = repImpl.getGroupDb();
        } catch (DatabaseNotFoundException e) {
            /* Should never happen. */
            throw EnvironmentFailureException.unexpectedException(e);
View Full Code Here


     */
    public boolean updateLocalCBVLSN(final NameIdPair nameIdPair,
                                     final VLSN newCBVLSN)
        throws DatabaseException {

        DatabaseImpl groupDbImpl = null;
        try {
            groupDbImpl = repImpl.probeGroupDb();
        } catch (DatabaseException e) {
            /* Contention on the groupDbImpl, try later. */
            return false;
View Full Code Here

        String nodeName = configManager.get(NODE_NAME);
        String hostPortPair = configManager.get(RepParams.NODE_HOST_PORT);
        String hostname = HostPortPair.getHostname(hostPortPair);
        int port = HostPortPair.getPort(hostPortPair);

        final DatabaseImpl dbImpl = repImpl.getGroupDb();

        /*
         * Retrieve the previous rep group object, so we can use its node
         * sequence id.
         */
 
View Full Code Here

        if (!parent.getInListResident()) {
            /* If the IN is not in the cache don't accumulate stats for it. */
            return;
        }

        final DatabaseImpl database = parent.getDatabase();
        updateCacheStats(increment, database.getDbEnvironment().getEvictor());
    }
View Full Code Here

    /**
     * Create an empty MapLN, to be filled in from the log.
     */
    public MapLN() {
        super();
        databaseImpl = new DatabaseImpl();
    }
View Full Code Here

        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

        }
        if (preloadAll) {
            preloadAllDatabases();
        }
        for (DatabaseId dbId : dbTree.getDbNamesAndIds().keySet()) {
            final DatabaseImpl dbImpl = dbTree.getDb(dbId);
            try {
                if (!needsConversion(dbImpl)) {
                    continue;
                }
                convertDatabase(dbImpl);
View Full Code Here

        final ArrayList<DatabaseImpl> dbsToConvert =
            new ArrayList<DatabaseImpl>();
        try {
            for (DatabaseId dbId : dbTree.getDbNamesAndIds().keySet()) {
                final DatabaseImpl dbImpl = dbTree.getDb(dbId);
                boolean releaseDbImpl = true;
                try {
                    if (!needsConversion(dbImpl)) {
                        continue;
                    }
View Full Code Here

        Iterator<SyncDatabase> databases = dataSet.getDatabases().iterator();

        while (databases.hasNext()) {
            Locker readLocker = null;
            boolean operationOK = false;
            DatabaseImpl dbImpl = null;
            String dbName = databases.next().getLocalName();

            try {
                readLocker = LockerFactory.getReadableLocker
                    (env, null,
                     false, /* transactional */
                     false /* readCommittedIsolation */);

                dbImpl = envImpl.getDbTree().getDb(readLocker, dbName, null);
                if (dbImpl != null) {
                    syncDbs.put(dbImpl.getId(),
                                new DbInfo(dbName,
                                           dbImpl.getSortedDuplicates()));
                }
                operationOK = true;
            } finally {
                if (dbImpl != null) {
                    envImpl.getDbTree().releaseDb(dbImpl);
View Full Code Here

            /* Process every IN and BIN in the mapping tree. */
            while (reader.readNextEntry()) {
                counter.incNumRead();
                DatabaseId dbId = reader.getDatabaseId();
                if (dbId.equals(DbTree.ID_DB_ID)) {
                    DatabaseImpl db = dbMapTree.getDb(dbId);
                    try {
                        replayOneIN(reader, db, false, recorder);
                        counter.incNumProcessed();
                    } finally {
                        dbMapTree.releaseDb(db);
View Full Code Here

TOP

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

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.