Interface PageActions

All Known Implementing Classes:
DirectActions, LoggableActions

public interface PageActions
  • Method Details

    • actionDelete

      void actionDelete(RawTransaction t, BasePage page, int slot, int recordId, boolean delete, LogicalUndo undo) throws StandardException
      Set the Delete status of the record at the given slot.

      Subclass that implements this method has to call BasePage.setDeleteStatus to update the delete status on the in-memory slot table.


      MT - latched, page is latched when this methods is called.

      Parameters:
      t - The transaction
      page - the target page
      slot - the slot number of the record
      recordId - the recordID of the record
      delete - set the delete status to this value
      undo - logical undo logic if necessary
      Throws:
      StandardException - Standard Derby error policy
      See Also:
    • actionUpdate

      int actionUpdate(RawTransaction t, BasePage page, int slot, int recordId, Object[] row, FormatableBitSet validColumns, int realStartColumn, DynamicByteArrayOutputStream logBuffer, int realSpaceOnPage, RecordHandle headRowHandle) throws StandardException
      Update record at the given slot with this row.


      MT - latched, page is latched when this methods is called.

      Parameters:
      t - The transaction
      page - the updated page
      slot - the slot number of the record
      recordId - the recordID of the record
      row - The new storable row
      validColumns - the columns that needs to be updated
      realStartColumn - the first column that is updated
      logBuffer - where to prepare the log record
      realSpaceOnPage - ??
      headRowHandle - the record handle of the head row
      Returns:
      the next column to update in the row or, -1 if the update has been completed.
      Throws:
      StandardException - Standard Derby error policy
      See Also:
    • actionPurge

      void actionPurge(RawTransaction t, BasePage page, int slot, int num_rows, int[] recordIds, boolean logData) throws StandardException
      Purge the record at the given slot.

      Subclass that implements this method has to remove the slot from the base page in-memory slot table (removeAndShiftDown).


      MT - latched, page is latched when this methods is called.

      Parameters:
      t - The transaction
      slot - the starting slot number of the record
      num_rows - how many rows to purge
      recordIds - the recordIDs of the record (an array of num_rows)
      Throws:
      StandardException - Standard Derby error policy
      See Also:
    • actionUpdateField

      void actionUpdateField(RawTransaction t, BasePage page, int slot, int recordId, int fieldId, Object newValue, LogicalUndo undo) throws StandardException
      Update a field of the record at the given slot with this value.


      MT - latched, page is latched when this methods is called.

      Parameters:
      t - The transaction
      slot - the slot number of the record
      recordId - the recordID of the record
      fieldId - the fieldId of the value
      newValue - the new value for the field
      undo - if logical undo may be necessary, a function pointer to the access code where the logical undo logic resides. Null if logical undo is not necessary.
      Throws:
      StandardException - Standard Derby error policy
      See Also:
    • actionInsert

      int actionInsert(RawTransaction t, BasePage page, int slot, int recordId, Object[] row, FormatableBitSet validColumns, LogicalUndo undo, byte insertFlag, int startColumn, boolean isLongColumn, int realStartColumn, DynamicByteArrayOutputStream logBuffer, int realSpaceOnPage, int overflowThreshold) throws StandardException
      Insert record at the given slot with this recordId.


      MT - latched, page is latched when this methods is called.

      Parameters:
      t - The transaction
      slot - the slot number of the record
      recordId - the recordID of the record
      row - The storable row
      undo - if logical undo may be necessary, a function pointer to the access code where the logical undo logic resides. Null if logical undo is not necessary.
      insertFlag - see Page value for insertFlag
      Throws:
      StandardException - Standard Derby error policy
      See Also:
    • actionCopyRows

      void actionCopyRows(RawTransaction t, BasePage destPage, BasePage srcPage, int destSlot, int numRows, int srcSlot, int[] recordIds) throws StandardException
      Copy num_rows from srcPage into deestpage.

      Longer descrption of routine.

      Parameters:
      t - The transaction
      destPage - the destination page
      srcPage - the source page
      destSlot - starting slot # of destination page to copy to
      numRows - the number of rows to be copied
      srcSlot - starting slot number of source page to copy from
      recordIds - an array of record ids to use in the destination page
      Throws:
      StandardException - Standard Derby policy.
    • actionInvalidatePage

      void actionInvalidatePage(RawTransaction t, BasePage page) throws StandardException
      Invalidate the page due to deallocation. Short one line description of routine.

      Invalidate the page due to deallocation - this is the action on the page that is being deallocated as opposed to the action on the allocation page.

      Parameters:
      t - The transaction
      page - that page to be invalidated
      Throws:
      StandardException - Standard Derby policy.
    • actionInitPage

      void actionInitPage(RawTransaction t, BasePage page, int initFlag, int pageFormatId, long pageOffset) throws StandardException
      Initialize the page due to allocation.

      Initialize the page due to allocation - this page could be brand new or it could be being re-allocated.

      Parameters:
      t - The transaction
      page - that page to be initialized
      initFlag - flags set to values in BasePage.INIT_PAGE_* which indicates how the new page is to be initialized.
      pageFormatId - The format Id of the page being initialized.
      Throws:
      StandardException - Standard Derby policy.
    • actionShrinkReservedSpace

      void actionShrinkReservedSpace(RawTransaction t, BasePage page, int slot, int recordId, int newValue, int oldValue) throws StandardException
      Shrink the reserved space to the new value.

      Shrink the reserved space to the new value. This action is not undoable.

      Parameters:
      t - The transaction
      page - that page to be initialized
      slot - the slot number of the record
      recordId - the recordID of the record
      newValue - the new reserved space value
      Throws:
      StandardException - Unexpected exception from the implementation