Package org.apache.derby.iapi.store.raw.log

Examples of org.apache.derby.iapi.store.raw.log.LogInstant


        instant = logFactory.
          appendLogRecord(logOutputBuffer.getByteArray(),
                  0, completeLength, null, 0, 0);
      }

      LogInstant logInstant = new LogCounter(instant);

      if (SanityManager.DEBUG)
            {
                if (SanityManager.DEBUG_ON(LogToFile.DBG_FLAG))
                {
                    SanityManager.DEBUG(
                        LogToFile.DBG_FLAG,
                        "Write CLR: Xact: " + transactionId.toString() +
                        "clrinstant: " + logInstant.toString() +
                        " undoinstant " + undoInstant + "\n");
                }
      }

      try
View Full Code Here


      synchronized(droppedTableStubInfo)
      {
        for (Enumeration<LogInstant> e = droppedTableStubInfo.keys();
                     e.hasMoreElements(); )
        {
          LogInstant logInstant  = e.nextElement();
          if(logInstant.lessThan(redoLWM))
          {
           
            Object[] removeInfo =
                            droppedTableStubInfo.get(logInstant);
            Object identity = removeInfo[1];
View Full Code Here

    // force WAL - and check to see if database is corrupt or is frozen.
    // last log Instant may be null if the page is being forced
    // to disk on a createPage (which violates the WAL protocol actually).
    // See FileContainer.newPage
    LogInstant flushLogTo = getLastLogInstant();
    dataFactory.flush(flushLogTo);

    if (flushLogTo != null)
        {         
      clearLastLogInstant();
View Full Code Here

  private void doAction(RawTransaction t, BasePage page, Loggable lop)
     throws StandardException
  {
    long oldversion = 0;    // sanity check
    LogInstant oldLogInstant = null; // sanity check
    if (SanityManager.DEBUG)
    {
      oldLogInstant = page.getLastLogInstant();
      oldversion = page.getPageVersion();
    }

    // mark the page as pre-dirtied so that if a checkpoint happens after
    // the log record is sent to the log stream, the cache cleaning will
    // wait for this change.
    page.preDirty();

    t.logAndDo(lop);

    if (SanityManager.DEBUG) {
      // log instant may not supported by underlying log factory, in that
      // case, it is expected to stay null
      if (oldLogInstant != null &&  page.getLastLogInstant() != null &&
              ! oldLogInstant.lessThan(page.getLastLogInstant()))
        SanityManager.THROWASSERT(
                 "old log instant = " + oldLogInstant +
                 " lastlog = " + page.getLastLogInstant() );

      SanityManager.ASSERT(
View Full Code Here

    DataFactory         df,
    TransactionFactory  tf,
    boolean             wait)
     throws StandardException
  {
    LogInstant  redoLWM;

        // we may be called to stop the database after a bad error, make sure
    // logout is set
    if (logOut == null)
    {
View Full Code Here

    if (state == ACTIVE)
      setUpdateState();

    seenUpdates = true;
   
    LogInstant clrInstant = logger.logAndUndo(this, compensation, undoInstant, in);

    setLastLogInstant(clrInstant);

    // set the top savepoint to rollback to this record if it doesn't yet have a point saved
    if ((savePoints != null) && !savePoints.empty()) {
View Full Code Here

   * @see Transaction#commit
     **/
  private LogInstant prepareCommit(int commitflag)
        throws StandardException
    {
    LogInstant flushTo = null;

    if (state == CLOSED)
        {
      throw StandardException.newException(
                    SQLState.XACT_PROTOCOL_VIOLATION_DETAILED,
View Full Code Here

    {
      if (SanityManager.DEBUG_ON("XATrace"))
        SanityManager.DEBUG("XATrace","commiting ");
    }

        LogInstant flushTo = prepareCommit(commitflag);

        completeCommit(commitflag);

        return(flushTo);
  }
View Full Code Here

      @exception StandardException  Standard Derby exception policy
    @see Transaction#logAndDo
  */
  public void logAndDo(Loggable operation) throws StandardException {

    LogInstant instant = null;

    if (logger == null)
      getLogger();

    if (logger == null)
View Full Code Here

    if (release) {
      savePoints.setSize(position);
      return false;
    }

    LogInstant rollbackTo = null;

    int size = savePoints.size();
    for (int i = position; i < size; i++) {
      SavePoint rollbackSavePoint = savePoints.elementAt(i);

      LogInstant li = rollbackSavePoint.getSavePoint();
      if (li != null) {
        rollbackTo = li;
        break;
      }
    }
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.store.raw.log.LogInstant

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.