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

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


    File oldbackup = null;
    File backupcopy = null;
    OutputStreamWriter historyFile = null;
        StorageFile dbHistoryFile = null;
        File backupHistoryFile = null;
    LogInstant backupInstant = logFactory.getFirstUnflushedInstant();
       
    try
    {
      // get name of the current db, ie. database directory of current db.
      StorageFile dbase           = storageFactory.newStorageFile(null);
View Full Code Here


  public String getFirstLogInstantString()
  {
    if (SanityManager.DEBUG)
      SanityManager.ASSERT(isClone, "Should only call method on a clone");

    LogInstant logInstant =
            (myxact == null) ? null : myxact.getFirstLogInstant();

    return (logInstant == null) ? null : logInstant.toString();

  }   
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

  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

    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);
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 cloudscape 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

    // 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

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.