Package com.sleepycat.je.log

Examples of com.sleepycat.je.log.LogEntryType


        final void maybeSpray(Message entry, OutputWireRecord record)
            throws IOException {

            if (--sprayAfterNMessagesCount == 0) {
                /* Ensure only txnal LNs get sprayed. */
                LogEntryType entryType =
                    LogEntryType.findType(record.getEntryType());
                if (!entryType.isUserLNType() ||
                    !entryType.isTransactional()) {
                    sprayAfterNMessagesCount++;
                    return;
                }
                LoggerUtils.info(logger, threadRepImpl,
                                 "Initiating message spray: " + entry);
View Full Code Here


    protected LogEntry instantiateEntry(EnvironmentImpl envImpl,
                                        ByteBuffer buffer)
        throws DatabaseException {

        LogEntryType type = LogEntryType.findType(header.getType());
        if (type == null) {
            throw EnvironmentFailureException.unexpectedState
                ("Unknown header type:" + header.getType());
        }
        LogEntry entry = type.getNewLogEntry();
        buffer.mark();
        entry.readEntry(envImpl, header, buffer);
        buffer.reset();
        return entry;
    }
View Full Code Here

                (new DatabaseEntry()) :
                null;
            lnEntry.getUserKeyData(key, data);

            /* Make sure the entry type is valid. */
            LogEntryType entryType =
                LogEntryType.findType(reader.getLogEntryType());
            assert entryType.isUserLNType() && entryType.isTransactional();

            /* Figure out the correct change type. */
            ChangeType type = ChangeType.DELETE;
            if (entryType == LogEntryType.LOG_INS_LN_TRANSACTIONAL) {
                type = ChangeType.INSERT;
View Full Code Here

         * the first CkptStart with no following CkptEnd.
         */
        while (reader.readNextEntry()) {
            counter.incNumRead();
            counter.incNumProcessed();
            LogEntryType type = reader.getEntryType();
            if (LogEntryType.LOG_CKPT_END.equals(type)) {
                info.checkpointEndLsn = reader.getLastLsn();
                info.partialCheckpointStartLsn = DbLsn.NULL_LSN;
            } else if (LogEntryType.LOG_CKPT_START.equals(type)) {
                if (info.partialCheckpointStartLsn == DbLsn.NULL_LSN) {
View Full Code Here

            /* Returning a NULL_LSN will not allow locking. */
            throw EnvironmentFailureException.unexpectedState
                ("Cannot log LNs in read-only env.");
        }

        LogEntryType entryType;
        long logAbortLsn;
        boolean logAbortKnownDeleted;
        Txn logTxn;
        LogContext context = new LogContext();

View Full Code Here

             * dup key is the one that navigates us in the main tree. The "key"
             * is the one that navigates us in the duplicate tree. Also, we
             * must check if this is a transactional entry that must be rolled
             * back or one done on the behalf of a null txn.
             */
            LogEntryType entryType;
            long logAbortLsn;
            boolean logAbortKnownDeleted;
            Txn logTxn;
            if (locker.isTransactional()) {
                entryType = LogEntryType.LOG_DEL_DUPLN_TRANSACTIONAL;
View Full Code Here

         long oldLsn,
         Locker locker,
         boolean isProvisional)
        throws DatabaseException {

        LogEntryType entryType;
        long logAbortLsn;
  boolean logAbortKnownDeleted;
        Txn logTxn;
        if (locker != null && locker.isTransactional()) {
            entryType = getTransactionalLogType();
View Full Code Here

         * of the log or an invalid entry.
         * Remember the last seen CkptEnd, and the first CkptStart with no
         * following CkptEnd.
         */
        while (reader.readNextEntry()) {
            LogEntryType type = reader.getEntryType();
            if (LogEntryType.LOG_CKPT_END.equals(type)) {
                info.checkpointEndLsn = reader.getLastLsn();
                info.partialCheckpointStartLsn = DbLsn.NULL_LSN;
            } else if (LogEntryType.LOG_CKPT_START.equals(type)) {
                if (info.partialCheckpointStartLsn == DbLsn.NULL_LSN) {
View Full Code Here

            new LNFileReader(env, readBufferSize, lastUsedLsn,
                             false, endOfFileLsn, firstActiveLsn, null);

        Iterator iter = lnTypes.iterator();
        while (iter.hasNext()) {
            LogEntryType lnType = (LogEntryType) iter.next();
            reader.addTargetType(lnType);
        }

        Map countedFileSummaries = new HashMap(); // TxnNodeId -> file number
        Set countedAbortLsnNodes = new HashSet(); // set of TxnNodeId
View Full Code Here

            new LNFileReader(env, readBufferSize, rollForwardLsn,
                             true, DbLsn.NULL_LSN, endOfFileLsn, null);

        Iterator iter = lnTypes.iterator();
        while (iter.hasNext()) {
            LogEntryType lnType = (LogEntryType) iter.next();
            reader.addTargetType(lnType);
        }

        Set countedAbortLsnNodes = new HashSet(); // set of TxnNodeId
View Full Code Here

TOP

Related Classes of com.sleepycat.je.log.LogEntryType

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.