Class PhysicalUndoOperation

  • All Implemented Interfaces:
    java.io.Externalizable, java.io.Serializable, Formatable, TypedFormat, Compensation, Loggable, RePreparable

    public final class PhysicalUndoOperation
    extends PageBasicOperation
    implements Compensation
    PhysicalUndoOperation is a compensation operation that rolls back the change of an Undo-able operation. A PhysicalUndoOperation itself is not undo-able, i.e, it is loggable but not undoable.
    See Also:
    Serialized Form
    Format IDLOGOP_PAGE_PHYSICAL_UNDO the formatId is written by FormatIdOutputStream when this object is written out by writeObject
    Purpose
    update a physical log operation
    Upgrade
    Disk LayoutPageBasicOperation the super class OptionalData none (compensation operation never have optional data)
    • Constructor Detail

      • PhysicalUndoOperation

        PhysicalUndoOperation​(BasePage page)
      • PhysicalUndoOperation

        PhysicalUndoOperation​(BasePage page,
                              PhysicalPageOperation op)
        Set up a compensation operation during run time rollback
      • PhysicalUndoOperation

        public PhysicalUndoOperation()
        Return my format identifier.
    • Method Detail

      • getTypeFormatId

        public int getTypeFormatId()
        Description copied from interface: TypedFormat
        Get a universally unique identifier for the type of this object.
        Specified by:
        getTypeFormatId in interface TypedFormat
        Returns:
        The identifier. (A UUID stuffed in an array of 16 bytes).
      • doMe

        public final void doMe​(Transaction xact,
                               LogInstant instant,
                               LimitObjectInput in)
                        throws StandardException,
                               java.io.IOException
        Apply the undo operation, in this implementation of the RawStore, it can only call the undoMe method of undoOp
        Specified by:
        doMe in interface Loggable
        Parameters:
        xact - the Transaction that is doing the rollback
        instant - the log instant of this undo operation
        in - optional data
        Throws:
        java.io.IOException - Can be thrown by any of the methods of InputStream.
        StandardException - Standard Derby policy.
      • releaseResource

        public void releaseResource​(Transaction xact)
        Description copied from class: PageBasicOperation
        Release latched page and any other resources acquired during a previous findpage, safe to call multiple times. In this RawStore implementataion, resource is acquired by a log operation in one of two places
      • during runtime or recovery undo in PageOperation.generateUndo()
      • during recovery redo in PageBasicOperation.needsRedo()
Specified by:
releaseResource in interface Loggable
Overrides:
releaseResource in class PageBasicOperation