Class PhysicalPageOperation

    • Constructor Detail

      • PhysicalPageOperation

        PhysicalPageOperation​(BasePage page)
      • PhysicalPageOperation

        public PhysicalPageOperation()
    • Method Detail

      • generateUndo

        public Compensation generateUndo​(Transaction xact,
                                         LimitObjectInput in)
                                  throws StandardException
        Generate a Compensation (PageUndoOperation) that will rollback the changes of this page operation. If this Page operation cannot or need not be rolled back (redo only), overwrite this function to return null.

        Note
        For operation that needs logical undo, use LogicalUndoOperation instead This implementation just finds the same page that the PageOperation was applied on - i.e., only works for undo on the same page.

        During recovery redo, the logging system is page oriented and will use the pageID stored in the PageUndoOperation to find the page. The page will be latched and released using the default findpage and releaseResource - this.releaseResource() will still be called so it has to know not to release any resource it did not acquire.

        Specified by:
        generateUndo in interface Undoable
        Parameters:
        xact - the transaction doing the compensating
        in - optional input
        Returns:
        the compensation operation that will rollback this change
        Throws:
        StandardException - Standard Derby policy.
        See Also:
        PageBasicOperation, Undoable.generateUndo(org.apache.derby.iapi.store.raw.Transaction, org.apache.derby.iapi.services.io.LimitObjectInput)
      • undoMe

        public abstract void undoMe​(Transaction xact,
                                    BasePage undoPage,
                                    LogInstant CLRinstant,
                                    LimitObjectInput in)
                             throws StandardException,
                                    java.io.IOException
        Undo the change indicated by this log operation and optional data. The page the undo should apply to is the latched undoPage, the recordId is the same as the roll forward operation.
        In this RawStore implementation, should only only be called via CompOp.doMe.

        The available() method of in indicates how much data can be read, i.e. how much was originally written.

        Parameters:
        xact - the Transaction doing the rollback
        undoPage - the page to rollback changes on
        CLRinstant - the log instant of this (PageUndo) operation
        in - optional data for the rollback operation
        Throws:
        java.io.IOException - Can be thrown by any of the methods of ObjectInput.
        StandardException - Standard Derby policy.