|
||||||||||
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
A PageBasicOperation changed the content of a page, this is the root class of all
page oriented operation. Each PageBasicOperation record change(s)
that apply to one and only one page. The pageID that is changed
must be recorded in the log operation - in other words, redo
must be physical (or more correctly, in Gray's term, physiological, since
changes are logical within a page).
Undo can be logical, but the undo logic must be hidden in
generateUndo. By the time a compensation operation is logged as a
LogOperation, the page that needs roll back must be determined.
Loggable
,
Serialized FormFormat ID | no format id, an abstract class. |
Purpose | provide methods for logical undo |
Upgrade | |
Disk Layout | pageId(PageKey) the page this operation applies to pageVersion(CompressedLong) the page version this operation applied to OptionalData none |
Field Summary | |
protected RawContainerHandle |
containerHdl
|
protected boolean |
foundHere
|
protected BasePage |
page
|
private PageKey |
pageId
|
private long |
pageVersion
|
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 | |
|
PageBasicOperation()
|
protected |
PageBasicOperation(BasePage page)
|
Method Summary | |
BasePage |
findpage(Transaction xact)
Find the page the operation applies to and latch it, this only uses the segmentId, containerId, and pageId stored in this log record to find the page. |
Page |
getPage()
|
protected BasePage |
getPageForLoadTran(Transaction xact)
Subclass (e.g., init page) that wishes to do something about missing pages in load tran should override this method to return the page |
protected PageKey |
getPageId()
|
long |
getPageVersion()
|
ByteArray |
getPreparedLog()
the default for optional data is set to null. |
int |
group()
A page operation is a RAWSTORE log record |
boolean |
needsRedo(Transaction xact)
Returns true if this op should be redone during recovery redo, if so, get and latched the page. |
void |
readExternal(java.io.ObjectInput in)
|
void |
reclaimPrepareLocks(Transaction t,
LockingPolicy locking_policy)
reclaim locks associated with the changes in this log record. |
void |
releaseResource(Transaction xact)
Release latched page and any other resources acquired during a previous findpage, safe to call multiple times. |
protected void |
resetPageNumber(long pageNumber)
Reset the pageNumber |
abstract void |
restoreMe(Transaction xact,
BasePage undoPage,
LogInstant CLRinstant,
LimitObjectInput in)
Undo the change indicated by this log operation and optional data. |
java.lang.String |
toString()
|
void |
writeExternal(java.io.ObjectOutput out)
|
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 |
doMe |
Methods inherited from interface org.apache.derby.iapi.services.io.TypedFormat |
getTypeFormatId |
Field Detail |
private PageKey pageId
private long pageVersion
protected transient BasePage page
protected transient RawContainerHandle containerHdl
protected transient boolean foundHere
Constructor Detail |
protected PageBasicOperation(BasePage page)
public PageBasicOperation()
Method Detail |
public java.lang.String toString()
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
public final boolean needsRedo(Transaction xact) throws StandardException
needsRedo
in interface Loggable
xact
- The transaction trying to redo this operation
StandardException
- Standard Cloudscape policy.Loggable.releaseResource(org.apache.derby.iapi.store.raw.Transaction)
public void releaseResource(Transaction xact)
releaseResource
in interface Loggable
public int group()
group
in interface Loggable
public ByteArray getPreparedLog() throws StandardException
getPreparedLog
in interface Loggable
StandardException
- Standard Cloudscape policy.public void reclaimPrepareLocks(Transaction t, LockingPolicy locking_policy) throws StandardException
reclaimPrepareLocks
in interface RePreparable
StandardException
- Standard exception policy.protected final void resetPageNumber(long pageNumber)
protected final PageKey getPageId()
public final BasePage findpage(Transaction xact) throws StandardException
StandardException
- Standard Cloudscape policy.protected BasePage getPageForLoadTran(Transaction xact) throws StandardException
StandardException
- Cloudscape Standard error policypublic final Page getPage()
public final long getPageVersion()
public abstract void restoreMe(Transaction xact, BasePage undoPage, LogInstant CLRinstant, LimitObjectInput in) throws StandardException, java.io.IOException
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
java.io.IOException
- Can be thrown by any of the methods of ObjectInput.
StandardException
- Standard Cloudscape policy.
|
Built on Mon 2007-06-04 09:58:47+0400, from revision ??? | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |