org.apache.derby.impl.store.raw.data
Class ChainAllocPageOperation
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.ChainAllocPageOperation
- All Implemented Interfaces:
- java.io.Externalizable, Formatable, Loggable, RePreparable, java.io.Serializable, TypedFormat, Undoable
- public final class ChainAllocPageOperation
- extends PhysicalPageOperation
- See Also:
- Serialized Form
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 |
Methods inherited from class org.apache.derby.impl.store.raw.data.PageBasicOperation |
findpage, getPage, getPageForLoadTran, 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 |
newAllocPageNum
protected long newAllocPageNum
newAllocPageOffset
protected long newAllocPageOffset
ChainAllocPageOperation
public ChainAllocPageOperation(AllocPage allocPage,
long pageNumber,
long pageOffset)
throws StandardException
ChainAllocPageOperation
public ChainAllocPageOperation()
writeExternal
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
- Specified by:
writeExternal
in interface java.io.Externalizable
- Overrides:
writeExternal
in class PageBasicOperation
- 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
- Overrides:
readExternal
in class PageBasicOperation
- Throws:
java.io.IOException
- error reading from log stream
java.lang.ClassNotFoundException
- 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
- Link the next alloc page into the page chain
- 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
- Unlink the next alloc page from the page chain
- Specified by:
undoMe
in class PhysicalPageOperation
- 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:
PhysicalPageOperation.undoMe(org.apache.derby.iapi.store.raw.Transaction, org.apache.derby.impl.store.raw.data.BasePage, org.apache.derby.iapi.store.raw.log.LogInstant, org.apache.derby.iapi.services.io.LimitObjectInput)
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 class PageBasicOperation
- 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
public java.lang.String toString()
- debug
- Overrides:
toString
in class PageBasicOperation
Apache Derby V10.1 Engine Documentation - Copyright © 1997,2005 The Apache Software Foundation or its licensors, as applicable.