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

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


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

    LogInstant rollbackTo = null;

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

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


  public final void doMe(Transaction xact, LogInstant instant, LimitObjectInput in)
     throws StandardException, IOException
  {

    long oldversion = 0;    // sanity check
    LogInstant oldLogInstant = null; // sanity check
    if (SanityManager.DEBUG)
    {
      oldLogInstant = this.page.getLastLogInstant();
      oldversion = this.page.getPageVersion();

      SanityManager.ASSERT(oldversion == this.getPageVersion());
      SanityManager.ASSERT(oldLogInstant == null || instant == null
               || oldLogInstant.lessThan(instant));
    }

    // if this is called during runtime rollback, PageOp.generateUndo found
    // the page and have it latched there.
    // if this is called during recovery redo, this.needsRedo found the page and
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

    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 = (SavePoint) savePoints.elementAt(i);

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

      synchronized(droppedTableStubInfo)
      {
        for (Enumeration e = droppedTableStubInfo.keys();
                     e.hasMoreElements(); )
        {
          LogInstant logInstant  = (LogInstant) e.nextElement();
          if(logInstant.lessThan(redoLWM))
          {
           
            Object[] removeInfo =
                            (Object[]) droppedTableStubInfo.get(logInstant);
            Object identity = removeInfo[1];
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

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.