Class InitPageOperation
java.lang.Object
org.apache.derby.impl.store.raw.data.PageBasicOperation
org.apache.derby.impl.store.raw.data.PhysicalPageOperation
org.apache.derby.impl.store.raw.data.InitPageOperation
- All Implemented Interfaces:
Externalizable, Serializable, Formatable, TypedFormat, Loggable, RePreparable, Undoable
This operation initializes the page that is being allocated,
this operation does not change the alloc page information.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected intprotected booleanprotected intprotected longprotected booleanFields inherited from class PageBasicOperation
containerHdl, foundHere, pageFields inherited from interface Loggable
ABORT, BI_LOG, CHECKSUM, COMMIT, COMPENSATION, FILE_RESOURCE, FIRST, LAST, PREPARE, RAWSTORE, XA_NEEDLOCK -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoMe(Transaction xact, LogInstant instant, LimitObjectInput in) Mark the page as valid, and clear out any crud from the pageprotected BasePageIf we are in load tran, this page may not exist for the container yet.intReturn my format identifier.voidRead this invoidrestoreMe(Transaction xact, BasePage undoPage, LogInstant CLRInstant, LimitObjectInput in) restore the before image of the pagetoString()voidundoMe(Transaction xact, BasePage undoPage, LogInstant CLRInstant, LimitObjectInput in) Mark the page as freevoidWrite this out.Methods inherited from class PhysicalPageOperation
generateUndoMethods inherited from class PageBasicOperation
findpage, getPage, getPageId, getPageVersion, getPreparedLog, group, needsRedo, reclaimPrepareLocks, releaseResource, resetPageNumberMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Loggable
getPreparedLog, group, needsRedo, releaseResource
-
Field Details
-
nextRecordId
protected int nextRecordId -
initFlag
protected int initFlag -
pageFormatId
protected int pageFormatId -
pageOffset
protected long pageOffset -
reuse
protected boolean reuse -
overflowPage
protected boolean overflowPage
-
-
Constructor Details
-
InitPageOperation
InitPageOperation(BasePage page, int flag, int formatid, long offset) throws StandardException - Throws:
StandardException
-
InitPageOperation
public InitPageOperation()
-
-
Method Details
-
writeExternal
Write this out.- Specified by:
writeExternalin interfaceExternalizable- Overrides:
writeExternalin classPageBasicOperation- Throws:
IOException- error writing to log stream
-
readExternal
Read this in- Specified by:
readExternalin interfaceExternalizable- Overrides:
readExternalin classPageBasicOperation- Throws:
IOException- error reading from log streamClassNotFoundException- log stream corrupted
-
getTypeFormatId
public int getTypeFormatId()Return my format identifier.- Returns:
- The identifier. (A UUID stuffed in an array of 16 bytes).
-
doMe
public void doMe(Transaction xact, LogInstant instant, LimitObjectInput in) throws StandardException, IOException Mark the page as valid, and clear out any crud from the page- Parameters:
xact- the Transactioninstant- the log instant of this operationin- optional data- Throws:
IOException- Can be thrown by any of the methods of ObjectInput.StandardException- Standard Derby policy.- See Also:
-
getPageForRedoRecovery
If we are in load tran, this page may not exist for the container yet. We need to create it first. This routine is called as the last resort of find page, the container handle has already been found and it is not dropped.- Overrides:
getPageForRedoRecoveryin classPageBasicOperation- Throws:
StandardException- Standard Derby policy.
-
undoMe
public void undoMe(Transaction xact, BasePage undoPage, LogInstant CLRInstant, LimitObjectInput in) throws StandardException, IOException Mark the page as free- Specified by:
undoMein classPhysicalPageOperation- Parameters:
xact- the Transaction doing the rollbackundoPage- the page to rollback changes onCLRInstant- the log instant of this (PageUndo) operationin- optional data for the rollback operation- Throws:
StandardException- Thrown by methods I callIOException- Thrown by methods I call- See Also:
-
restoreMe
public void restoreMe(Transaction xact, BasePage undoPage, LogInstant CLRInstant, LimitObjectInput in) throws StandardException, IOException restore the before image of the page- Specified by:
restoreMein classPageBasicOperation- Parameters:
xact- the Transaction doing the rollbackundoPage- the page to rollback changes onCLRInstant- the log instant of this (PageUndo) operationin- optional data for the rollback operation- Throws:
StandardException- Standard Derby Error PolicyIOException- problem reading the complete log record from the input stream
-
toString
- Overrides:
toStringin classPageBasicOperation
-