Package com.sleepycat.je.dbi

Examples of com.sleepycat.je.dbi.DatabaseId


                                     entryBuffer,
                                     true); // readFullItem
            entryLoaded = true;
            if (currentEntryHeader.getType() !=
                LogEntryType.LOG_ROLLBACK_START.getTypeNum()) {
                DatabaseId dbId = getDatabaseId();
                boolean isMapDb = dbId.equals(DbTree.ID_DB_ID);
                useEntry = (!mapDbOnly || isMapDb);
            }
        }

        /* Do a partial load during tracking if necessary. */
        if (!trackIds) {
            return useEntry;
        }

        DatabaseId dbIdToReset = null;
        long fileNumToReset = -1;

        /*
         * Process db and txn id tracking entries.  Note that these entries do
         * not overlap with targetLogEntry.
         */
        LNLogEntry lnEntry = null;
        if (dbIdTrackingEntry != null) {
            /* This entry has a db id */
            lnEntry = dbIdTrackingEntry;

            /*
             * Do a full load to get DB ID from DatabaseImpl. Note that while a
             * partial read gets the database id for the database that owns
             * this LN, it doesn't get the database id for the database
             * contained by a MapLN. That's what we're trying to track.
             */
            lnEntry.readEntry(currentEntryHeader,
                              entryBuffer,
                              true); // readFullItem
            entryLoaded = true;
            MapLN mapLN = (MapLN) lnEntry.getMainItem();
            DatabaseId dbId = mapLN.getDatabase().getId();
            int dbIdVal = dbId.getId();
            maxDbId = (dbIdVal > maxDbId) ? dbIdVal : maxDbId;
            minReplicatedDbId = (dbIdVal < minReplicatedDbId) ?
                dbIdVal : minReplicatedDbId;

            /*
 
View Full Code Here


            /*
       * Process every IN, INDeleteInfo, and INDupDeleteInfo in the
       * mapping tree.
       */
            while (reader.readNextEntry()) {
                DatabaseId dbId = reader.getDatabaseId();
                if (dbId.equals(DbTree.ID_DB_ID)) {
                    DatabaseImpl db = dbMapTree.getDb(dbId);
                    replayOneIN(reader, db, false);
                    info.numMapINs++;
                }
            }
View Full Code Here

             * Read all non-provisional INs, and process if they don't belong
             * to the mapping tree.
             */
            DbTree dbMapTree = env.getDbMapTree();
            while (reader.readNextEntry()) {
                DatabaseId dbId = reader.getDatabaseId();
                boolean isMapDb = dbId.equals(DbTree.ID_DB_ID);
                boolean isTarget = false;

                if (mapDbOnly && isMapDb) {
                    isTarget = true;
                } else if (!mapDbOnly && !isMapDb) {
View Full Code Here

      LN ln = reader.getLN();
      long logLsn = reader.getLastLsn();
      long abortLsn = reader.getAbortLsn();
      boolean abortKnownDeleted =
          reader.getAbortKnownDeleted();
      DatabaseId dbId = reader.getDatabaseId();
      DatabaseImpl db = dbMapTree.getDb(dbId);
                       
      /* Database may be null if it's been deleted. */
      if (db != null) {
          ln.postFetchInit(db, logLsn);
View Full Code Here

                        /* Invoke the evictor to reduce memory consumption. */
                        env.invokeEvictor();

                        LN ln = reader.getLN();
                        DatabaseId dbId = reader.getDatabaseId();
                        DatabaseImpl db = dbMapTree.getDb(dbId);
                        long logLsn = reader.getLastLsn();
                        long treeLsn = DbLsn.NULL_LSN;

                        /* Database may be null if it's been deleted. */
 
View Full Code Here

        env.getDbMapTree().rebuildINListMapDb();    // scan map db

        /* For all the dbs that we read in recovery, scan for resident INs. */
        Iterator iter = inListRebuildDbIds.iterator();
        while (iter.hasNext()) {
            DatabaseId dbId = (DatabaseId) iter.next();
            /* We already did the map tree, don't do it again. */
            if (!dbId.equals(DbTree.ID_DB_ID)) {
                DatabaseImpl db = env.getDbMapTree().getDb(dbId);
                db.getTree().rebuildINList();
            }
        }
    }
View Full Code Here

TOP

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

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.