|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.impl.store.raw.data.PageBasicOperation
org.apache.derby.impl.store.raw.data.LogicalUndoOperation
LogicalUndoOperation is a compensation operation that rolls back the change of an LogicalUndoable operation. A LogicalUndoOperation itself is not undo-able, i.e, it is loggable but not undoable.
Format ID | LOGOP_PAGE_LOGICAL_UNDO the formatId is written by FormatIdOutputStream when this object is written out by writeObject |
Purpose | undo a logical log operation |
Upgrade | |
Disk Layout | PageBasicOperation the super class recordId(CompressedInt) the recordId of the changed row (this may not be the recordId during rollback if the record moved from one page to another) OptionalData none (compensation operation never have optional data) |
Field Summary | |
protected int |
recordId
|
private LogicalPageOperation |
undoOp
The operation to be rolled back |
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, COMMIT, COMPENSATION, FILE_RESOURCE, FIRST, LAST, PREPARE, RAWSTORE, XA_NEEDLOCK |
Constructor Summary | |
|
LogicalUndoOperation()
Return my format identifier. |
protected |
LogicalUndoOperation(BasePage page)
|
|
LogicalUndoOperation(BasePage page,
int recordId,
LogicalPageOperation op)
Set up a compensation operation during run time rollback |
Method Summary | |
void |
doMe(Transaction xact,
LogInstant instant,
LimitObjectInput in)
Apply the undo operation, in this implementation of the RawStore, it can only call the undoMe method of undoOp |
ByteArray |
getPreparedLog()
The log operations are responsible to create the ByteArray, and the log operations should write out any optional data for the change to the ByteArray. |
int |
getTypeFormatId()
Get a universally unique identifier for the type of this object. |
int |
group()
Get the loggable's group value |
void |
readExternal(java.io.ObjectInput in)
Read this in |
void |
releaseResource(Transaction xact)
Release any resource that was acquired for doMe for rollback or recovery redo. |
void |
restoreMe(Transaction xact,
BasePage undoPage,
LogInstant CLRinstant,
LimitObjectInput in)
Undo the change indicated by this log operation and optional data. |
void |
setUndoOp(Undoable op)
Set up a LogicalOperation during recovery redo. |
java.lang.String |
toString()
DEBUG: Print self. |
void |
writeExternal(java.io.ObjectOutput out)
Write this out. |
Methods inherited from class org.apache.derby.impl.store.raw.data.PageBasicOperation |
findpage, getPage, getPageForLoadTran, getPageId, getPageVersion, needsRedo, reclaimPrepareLocks, 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 |
needsRedo |
Field Detail |
protected int recordId
private transient LogicalPageOperation undoOp
Constructor Detail |
protected LogicalUndoOperation(BasePage page)
public LogicalUndoOperation(BasePage page, int recordId, LogicalPageOperation op)
public LogicalUndoOperation()
Method Detail |
public int getTypeFormatId()
TypedFormat
getTypeFormatId
in interface TypedFormat
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
writeExternal
in class PageBasicOperation
java.io.IOException
- error writing to log streampublic void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
readExternal
in class PageBasicOperation
java.io.IOException
- error reading from log stream
java.lang.ClassNotFoundException
- log stream corruptedpublic void restoreMe(Transaction xact, BasePage undoPage, LogInstant CLRinstant, LimitObjectInput in)
PageBasicOperation
restoreMe
in class PageBasicOperation
xact
- the Transaction doing the rollbackundoPage
- the page to rollback changes onCLRinstant
- the log instant of this (PageUndo) operationin
- optional data for the rollback operationpublic void setUndoOp(Undoable op)
setUndoOp
in interface Compensation
op
- the Undoable operationLoggable.needsRedo(org.apache.derby.iapi.store.raw.Transaction)
public final void doMe(Transaction xact, LogInstant instant, LimitObjectInput in) throws StandardException, java.io.IOException
doMe
in interface Loggable
xact
- the Transaction that is doing the rollbackinstant
- the log instant of this undo operationin
- optional data
java.io.IOException
- Can be thrown by any of the methods of ObjectInput.
StandardException
- Standard Cloudscape policy.public void releaseResource(Transaction xact)
Loggable
releaseResource
in interface Loggable
releaseResource
in class PageBasicOperation
public int group()
Loggable
group
in interface Loggable
group
in class PageBasicOperation
public final ByteArray getPreparedLog()
Loggable
getPreparedLog
in interface Loggable
getPreparedLog
in class PageBasicOperation
public java.lang.String toString()
toString
in class PageBasicOperation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |