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 int
protected int
protected boolean
protected int
protected long
protected boolean
Fields inherited from class org.apache.derby.impl.store.raw.data.PageBasicOperation
containerHdl, foundHere, page
Fields inherited from interface org.apache.derby.iapi.store.raw.Loggable
ABORT, BI_LOG, CHECKSUM, COMMIT, COMPENSATION, FILE_RESOURCE, FIRST, LAST, PREPARE, RAWSTORE, XA_NEEDLOCK
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
doMe
(Transaction xact, LogInstant instant, LimitObjectInput in) Mark the page as valid, and clear out any crud from the pageprotected BasePage
If we are in load tran, this page may not exist for the container yet.int
Return my format identifier.void
Read this invoid
restoreMe
(Transaction xact, BasePage undoPage, LogInstant CLRInstant, LimitObjectInput in) restore the before image of the pagetoString()
void
undoMe
(Transaction xact, BasePage undoPage, LogInstant CLRInstant, LimitObjectInput in) Mark the page as freevoid
Write this out.Methods inherited from class org.apache.derby.impl.store.raw.data.PhysicalPageOperation
generateUndo
Methods inherited from class org.apache.derby.impl.store.raw.data.PageBasicOperation
findpage, getPage, getPageId, getPageVersion, getPreparedLog, group, needsRedo, reclaimPrepareLocks, releaseResource, resetPageNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.derby.iapi.store.raw.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:
writeExternal
in interfaceExternalizable
- Overrides:
writeExternal
in classPageBasicOperation
- Throws:
IOException
- error writing to log stream
-
readExternal
Read this in- Specified by:
readExternal
in interfaceExternalizable
- Overrides:
readExternal
in 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:
getPageForRedoRecovery
in 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:
undoMe
in 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:
restoreMe
in 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:
toString
in classPageBasicOperation
-