Package com.sleepycat.je.log.entry

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


         */
        assertTrue(targetBIN.log(logManager, true, false, false, null) ==
       DbLsn.NULL_LSN);

        /* Read the delta back. */
        LogEntry partial =
            logManager.getLogEntry(targetBIN.getLastDeltaVersion());

        /* Make sure that this is was a delta entry. */
        assertTrue(partial.getMainItem() instanceof BINDelta);
        BINDelta delta = (BINDelta) partial.getMainItem();

        /* Compare to the current version. */
        BIN createdBIN =
            delta.reconstituteBIN(DbInternal.envGetEnvironmentImpl(env));
        if (DEBUG) {
View Full Code Here


            assert LogEntryType.isValidType(loggableType):
                "Read non-valid log entry type: " + loggableType;

            /* Read the entry. */
            LogEntry logEntry =
                LogEntryType.findType(loggableType, version).getNewLogEntry();
            logEntry.readEntry(entryBuffer, itemSize, version, true);

            /* For testing only; generate a read io exception. */
            if (readHook != null) {
                readHook.doIOHook();
            }
View Full Code Here

     * @return the object in the log
     */
    public Object get(long lsn)
        throws DatabaseException {

        LogEntry entry = getLogEntry(lsn);
        return entry.getMainItem();
    }
View Full Code Here

                if (!isLatchOwnerForWrite()) {
                    throw RelatchRequiredException.relatchRequiredException;
                }

                try {
                    LogEntry logEntry =
                        envImpl.getLogManager().
                        getLogEntryAllowInvisibleAtRecovery(lsn);
                    Node node = (Node) logEntry.getMainItem();
                    node.postFetchInit(databaseImpl, lsn);
                    /* Ensure keys are transactionally correct. [#15704] */
                    byte[] lnSlotKey = null;
                    if (logEntry instanceof LNLogEntry) {
                        LNLogEntry lnEntry = (LNLogEntry) logEntry;
View Full Code Here

     * @return the object in the log
     */
    public Object get(long lsn)
        throws DatabaseException {

        LogEntry entry = getLogEntry(lsn);
        return entry.getMainItem();
    }
View Full Code Here

        throws DatabaseException {

        LogEntryType lastEntryType =
            LogEntryType.findType(currentEntryTypeNum,
          currentEntryTypeVersion);
  LogEntry entry = lastEntryType.getSharedLogEntry();
        entry.readEntry(entryBuffer, currentEntrySize,
                        currentEntryTypeVersion, true);
  processEntryCallback(entry, lastEntryType);
        return true;
    }
View Full Code Here

        fsTrackingEntry = null;
        isProvisional = LogEntryType.isProvisional(entryTypeVersion);

        /* Get the log entry type instance we need to read the entry. */
        fromLogType = LogEntryType.findType(entryTypeNum, entryTypeVersion);
        LogEntry possibleTarget = (LogEntry) targetEntryMap.get(fromLogType);

        /*
         * If the entry is provisional, we won't be reading it in its entirety;
         * otherwise, we try to establish targetLogEntry.
         */
 
View Full Code Here

            assert LogEntryType.isValidType(loggableType):
                "Read non-valid log entry type: " + loggableType;

            /* Read the entry. */
            LogEntry logEntry =
                LogEntryType.findType(loggableType, version).getNewLogEntry();
            logEntry.readEntry(entryBuffer, itemSize, version, true);

            /* For testing only; generate a read io exception. */
            if (readHook != null) {
                readHook.doIOHook();
            }
View Full Code Here

            sb.append("\" cksum=\"").append(currentEntryChecksum);
        }
        sb.append("\">");

        /* Read the entry and dump it into a string buffer. */
  LogEntry entry = lastEntryType.getSharedLogEntry();
        entry.readEntry(entryBuffer, currentEntrySize,
                        currentEntryTypeVersion, true);
  boolean dumpIt = true;
  if (targetTxnIds.size() > 0) {
      if (entry.isTransactional()) {
    if (!targetTxnIds.contains
        (new Long(entry.getTransactionId()))) {
        /* Not in the list of txn ids. */
        dumpIt = false;
    }
      } else {
    /* If -tx spec'd and not a transactional entry, don't dump. */
    dumpIt = false;
      }
  }

  if (dumpIt) {
      entry.dumpEntry(sb, verbose);
      sb.append("</entry>");
      System.out.println(sb.toString());
  }
       
        return true;
View Full Code Here

        /*
         * Read the file header from this file. It's always the first log
         * entry.
         */
        LogManager logManager = envImpl.getLogManager();
        LogEntry headerEntry =
            logManager.getLogEntry(DbLsn.makeLsn(fileNum, 0), file);
        FileHeader header = (FileHeader) headerEntry.getMainItem();
        return header.validate(fileName, fileNum);
    }
View Full Code Here

TOP

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

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.