Class PageBasicOperation

  • All Implemented Interfaces:
    java.io.Externalizable, java.io.Serializable, Formatable, TypedFormat, Loggable, RePreparable
    Direct Known Subclasses:
    LogicalPageOperation, LogicalUndoOperation, PhysicalPageOperation, PhysicalUndoOperation, SetReservedSpaceOperation

    abstract class PageBasicOperation
    extends java.lang.Object
    implements Loggable, RePreparable
    A PageBasicOperation changed the content of a page, this is the root class of all page oriented operation. Each PageBasicOperation record change(s) that apply to one and only one page. The pageID that is changed must be recorded in the log operation - in other words, redo must be physical (or more correctly, in Gray's term, physiological, since changes are logical within a page).
    Undo can be logical, but the undo logic must be hidden in generateUndo. By the time a compensation operation is logged as a LogOperation, the page that needs roll back must be determined.
    See Also:
    Loggable
    Format IDno format id, an abstract class.
    Purpose
    provide methods for logical undo
    Upgrade
    Disk LayoutpageId(PageKey) the page this operation applies to pageVersion(CompressedLong) the page version this operation applied to OptionalData none
    • Field Detail

      • pageVersion

        private long pageVersion
      • page

        protected transient BasePage page
      • foundHere

        protected transient boolean foundHere
    • Constructor Detail

      • PageBasicOperation

        PageBasicOperation​(BasePage page)
      • PageBasicOperation

        PageBasicOperation()
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • writeExternal

        public void writeExternal​(java.io.ObjectOutput out)
                           throws java.io.IOException
        Specified by:
        writeExternal in interface java.io.Externalizable
        Throws:
        java.io.IOException
      • readExternal

        public void readExternal​(java.io.ObjectInput in)
                          throws java.io.IOException,
                                 java.lang.ClassNotFoundException
        Specified by:
        readExternal in interface java.io.Externalizable
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • releaseResource

        public void releaseResource​(Transaction xact)
        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