Package com.sleepycat.je.log.entry

Examples of com.sleepycat.je.log.entry.INLogEntry


                applyTxn(twoEntryList, true);
            }
        } else if (entry instanceof INLogEntry) {

            /* Count IN. */
            final INLogEntry inEntry = (INLogEntry) entry;
            final Long nodeId = Long.valueOf(inEntry.getNodeId());
            summary.totalINCount += 1;
            summary.totalINSize += size;
            countObsoleteIN(nodeId);
            putActiveIN(nodeId, size, summary, inEntry.getDbId().getId());

        } else if (entry instanceof BINDeltaLogEntry) {

            /* Count Delta as IN. */
            summary.totalINCount += 1;
View Full Code Here


            }
        }

        /* Process IN types. */
        if (fromLogType.isINType()) {
            INLogEntry inEntry = (INLogEntry) targetLogEntry;

            /* Keep track of the largest node ID seen. */
            long nodeId = inEntry.getNodeId();
            assert (nodeId != Node.NULL_NODE_ID);
            maxNodeId = (nodeId > maxNodeId) ? nodeId : maxNodeId;
            minReplicatedNodeId = (nodeId < minReplicatedNodeId) ?
                nodeId : minReplicatedNodeId;
        }

        /* Process INContainingEntry types. */
        if (fromLogType.isINType() ||
            fromLogType.equals(LogEntryType.LOG_BIN_DELTA)) {

            INContainingEntry inEntry =
                (INContainingEntry) targetLogEntry;

            /*
             * Count the obsolete LSN of the previous version, if available and
             * if not already counted.  Use inexact counting for two reasons:
             * 1) we don't always have the full LSN because earlier log
             * versions only had the file number, and 2) we can't guarantee
             * obsoleteness for provisional INs.
             */
            long oldLsn = inEntry.getPrevFullLsn();
            if (oldLsn != DbLsn.NULL_LSN) {
                long newLsn = getLastLsn();
                tracker.countObsoleteIfUncounted
                    (oldLsn, newLsn, fromLogType, 0, inEntry.getDbId(),
                     false /*countExact*/);
            }
            oldLsn = inEntry.getPrevDeltaLsn();
            if (oldLsn != DbLsn.NULL_LSN) {
                long newLsn = getLastLsn();
                tracker.countObsoleteIfUncounted
                    (oldLsn, newLsn, fromLogType, 0, inEntry.getDbId(),
                     false /*countExact*/);
            }

            /*
             * Count a provisional IN as obsolete if it follows
             * partialCkptStart.  It cannot have been already counted, because
             * provisional INs are not normally counted as obsolete; they are
             * only considered obsolete when they are part of a partial
             * checkpoint.
             *
             * Depending on the exact point at which the checkpoint was
             * aborted, this technique is not always accurate; therefore
             * inexact counting must be used.
             */
            if (isProvisional && partialCkptStart != DbLsn.NULL_LSN) {
                oldLsn = getLastLsn();
                if (DbLsn.compareTo(partialCkptStart, oldLsn) < 0) {
                    tracker.countObsoleteUnconditional
                        (oldLsn, fromLogType, 0, inEntry.getDbId(),
                         false /*countExact*/);
                }
            }
        }

View Full Code Here

        beforeLogCommon(item, context,
                        doDeltaLog ? DbLsn.NULL_LSN : getLastFullVersion(),
                        lastDeltaVersion);
        item.entry = doDeltaLog ?
            (new BINDeltaLogEntry(deltaInfo)) :
            (new INLogEntry(this));
    }
View Full Code Here

     */
    public void beforeLog(LogManager logManager,
                          INLogItem item,
                          INLogContext context) {
        beforeLogCommon(item, context, lastFullVersion, DbLsn.NULL_LSN);
        item.entry = new INLogEntry(this);
    }
View Full Code Here

         * obsolete and can be flushed. If logging provisionally, the last
         * version isn't obsolete until an ancestor is logged
         * non-provisionally, so propagate obsolete lsns upwards.
         */
        long lsn = logManager.log
            (new INLogEntry(this), isProvisional,
             isProvisional ? DbLsn.NULL_LSN : lastFullVersion);

        if (isProvisional) {
            assert parent != null;
            parent.trackProvisionalObsolete
View Full Code Here

        throws DatabaseException {

        assert isLatchOwnerForWrite();
        assert item.parent == null || item.parent.isLatchOwnerForWrite();

        item.entry = new INLogEntry(this);
        /* Count obsolete info when logging non-provisionally. */
        if (countObsoleteDuringLogging(item.provisional)) {
            item.oldLsn = lastFullVersion;
            context.packedObsoleteInfo = provisionalObsolete;
        }
View Full Code Here

         * obsolete and can be flushed. If logging provisionally, the last
         * version isn't obsolete until an ancestor is logged
         * non-provisionally, so propagate obsolete lsns upwards.
         */
        long lsn = logManager.log
            (new INLogEntry(this), isProvisional,
             isProvisional ? DbLsn.NULL_LSN : lastFullVersion);

        if (isProvisional) {
            if (parent != null) {
                parent.trackProvisionalObsolete
View Full Code Here

                twoEntryList.set(0, summary);
                twoEntryList.set(1, lnEntry);
                applyTxn(twoEntryList, true);
            }
        } else if (entry instanceof INLogEntry) {
            INLogEntry inEntry = (INLogEntry) entry;
            Long nodeId = Long.valueOf(inEntry.getNodeId());
            summary.totalINCount += 1;
            summary.totalINSize += size;
            countObsoleteNode(nodeId);
            putActiveNode(nodeId, size, summary,
                          inEntry.getDbId().getId(),
                          false);
        } else if (entry instanceof SingleItemEntry) {
            Object item = ((SingleItemEntry) entry).getMainItem();
            long deletedNodeId = Node.NULL_NODE_ID;
            if (item instanceof INDeleteInfo) {
View Full Code Here

TOP

Related Classes of com.sleepycat.je.log.entry.INLogEntry

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.