Class AllocPageOperation
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.AllocPageOperation
- All Implemented Interfaces:
Externalizable
,Serializable
,Formatable
,TypedFormat
,Loggable
,RePreparable
,Undoable
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
protected long
protected int
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
ConstructorsConstructorDescriptionAllocPageOperation
(AllocPage allocPage, long pageNumber, int doStatus, int undoStatus) -
Method Summary
Modifier and TypeMethodDescriptionfinal void
doMe
(Transaction tran, LogInstant instant, LimitObjectInput in) Allocate/deallocate/free this page numberint
Return my format identifier.void
void
restoreMe
(Transaction xact, BasePage undoPage, LogInstant CLRinstant, LimitObjectInput in) Undo the change indicated by this log operation and optional data.toString()
debugvoid
undoMe
(Transaction xact, BasePage undoPage, LogInstant CLRInstant, LimitObjectInput in) Allocate/deallocate/free this page number.void
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, getPageForRedoRecovery, 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
-
newPageNumber
protected long newPageNumber -
doStatus
protected int doStatus -
undoStatus
protected int undoStatus
-
-
Constructor Details
-
AllocPageOperation
AllocPageOperation(AllocPage allocPage, long pageNumber, int doStatus, int undoStatus) throws StandardException - Throws:
StandardException
-
AllocPageOperation
public AllocPageOperation()
-
-
Method Details
-
writeExternal
- Specified by:
writeExternal
in interfaceExternalizable
- Overrides:
writeExternal
in classPageBasicOperation
- Throws:
IOException
-
readExternal
- Specified by:
readExternal
in interfaceExternalizable
- Overrides:
readExternal
in classPageBasicOperation
- Throws:
IOException
- error reading from log streamClassNotFoundException
- cannot read object from input
-
getTypeFormatId
public int getTypeFormatId()Return my format identifier.- Returns:
- The identifier. (A UUID stuffed in an array of 16 bytes).
-
doMe
public final void doMe(Transaction tran, LogInstant instant, LimitObjectInput in) throws StandardException Allocate/deallocate/free this page number- Parameters:
tran
- the Transactioninstant
- the log instant of this operationin
- optional data- Throws:
StandardException
- container Handle is not active
-
undoMe
public void undoMe(Transaction xact, BasePage undoPage, LogInstant CLRInstant, LimitObjectInput in) throws StandardException Allocate/deallocate/free this page number.- 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 call- See Also:
-
restoreMe
public void restoreMe(Transaction xact, BasePage undoPage, LogInstant CLRinstant, LimitObjectInput in) Description copied from class:PageBasicOperation
Undo the change indicated by this log operation and optional data. The page the undo should apply to is the latched undoPage. The undoPage must be the same page as the doMe page and the undo operation must restore the before image of the row that changed.
this can only be used under special circumstances: namely table level locking, and no internal or nested transaction, and all operations are rollec back with restoreMe instead of undoMe.
This method is here to support BeforeImageLogging- 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
-
toString
debug- Overrides:
toString
in classPageBasicOperation
-