Top Description Fields Constructors Methods
org.apache.derby.impl.store.raw.data

public final Class InitPageOperation

extends PhysicalPageOperation
Class Inheritance
Imports
org.apache.derby.impl.store.raw.data.BasePage, org.apache.derby.shared.common.sanity.SanityManager, org.apache.derby.iapi.services.io.FormatIdUtil, .StoredFormatIds, .CompressedNumber, .LimitObjectInput, org.apache.derby.shared.common.error.StandardException, org.apache.derby.iapi.store.raw.RecordHandle, .Page, .Transaction, org.apache.derby.iapi.store.raw.log.LogInstant, java.io.OutputStream, .ObjectOutput, .ObjectInput, .IOException

This operation initializes the page that is being allocated, this operation does not change the alloc page information.

Field Summary

Modifier and TypeField and Description
protected int
protected int
protected boolean
protected int
protected long
protected boolean

Constructor Summary

AccessConstructor and Description
pack-priv
InitPageOperation(BasePage page, int flag, int formatid, long offset)

public

Method Summary

Modifier and TypeMethod and Description
public void
doMe(Transaction
the Transaction
xact
,
LogInstant
the log instant of this operation
instant
,
LimitObjectInput
optional data
in
)

Implements org.apache.derby.iapi.store.raw.Loggable.doMe.

Mark the page as valid, and clear out any crud from the page

protected BasePage
getPageForRedoRecovery(Transaction xact)

Overrides org.apache.derby.impl.store.raw.data.PageBasicOperation.getPageForRedoRecovery.

If we are in load tran, this page may not exist for the container yet.

public int
public void
readExternal(ObjectInput
the stream to read data from in order to restore the object
in
)

Overrides org.apache.derby.impl.store.raw.data.PageBasicOperation.readExternal.

Implements java.io.Externalizable.readExternal.

Read this in

public void
restoreMe(Transaction
the Transaction doing the rollback
xact
,
BasePage
the page to rollback changes on
undoPage
,
LogInstant
the log instant of this (PageUndo) operation
CLRInstant
,
LimitObjectInput
optional data for the rollback operation
in
)

Implements abstract org.apache.derby.impl.store.raw.data.PageBasicOperation.restoreMe.

restore the before image of the page

public String
toString()

Overrides org.apache.derby.impl.store.raw.data.PageBasicOperation.toString.

Returns a string representation of the object.

public void
undoMe(Transaction
the Transaction doing the rollback
xact
,
BasePage
the page to rollback changes on
undoPage
,
LogInstant
the log instant of this (PageUndo) operation
CLRInstant
,
LimitObjectInput
optional data for the rollback operation
in
)

Implements abstract org.apache.derby.impl.store.raw.data.PhysicalPageOperation.undoMe.

Mark the page as free

public void
Inherited from org.apache.derby.impl.store.raw.data.PhysicalPageOperation:
generateUndo

Field Detail

initFlagback to summary
protected int initFlag
nextRecordIdback to summary
protected int nextRecordId
overflowPageback to summary
protected boolean overflowPage
pageFormatIdback to summary
protected int pageFormatId
pageOffsetback to summary
protected long pageOffset
reuseback to summary
protected boolean reuse

Constructor Detail

InitPageOperationback to summary
pack-priv InitPageOperation(BasePage page, int flag, int formatid, long offset) throws StandardException
InitPageOperationback to summary
public InitPageOperation()

Method Detail

doMeback to summary
public void doMe(Transaction xact, LogInstant instant, LimitObjectInput in) throws StandardException, IOException

Implements org.apache.derby.iapi.store.raw.Loggable.doMe.

Mark the page as valid, and clear out any crud from the page

Parameters
xact:Transaction

Doc from org.apache.derby.iapi.store.raw.Loggable.doMe.

the Transaction

instant:LogInstant

Doc from org.apache.derby.iapi.store.raw.Loggable.doMe.

the log instant of this operation

in:LimitObjectInput

Doc from org.apache.derby.iapi.store.raw.Loggable.doMe.

optional data

Exceptions
StandardException:
Standard Derby policy.
IOException:
Can be thrown by any of the methods of ObjectInput.
See Also
org.apache.derby.iapi.store.raw.Loggable#doMe
getPageForRedoRecoveryback to summary
protected BasePage getPageForRedoRecovery(Transaction xact) throws StandardException

Overrides org.apache.derby.impl.store.raw.data.PageBasicOperation.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.

Exceptions
StandardException:
Standard Derby policy.
getTypeFormatIdback to summary
public int getTypeFormatId()

Implements org.apache.derby.iapi.services.io.TypedFormat.getTypeFormatId.

Return my format identifier.

Returns:int

Doc from org.apache.derby.iapi.services.io.TypedFormat.getTypeFormatId.

The identifier. (A UUID stuffed in an array of 16 bytes).

readExternalback to summary
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException

Overrides org.apache.derby.impl.store.raw.data.PageBasicOperation.readExternal.

Implements java.io.Externalizable.readExternal.

Read this in

Parameters
in:ObjectInput

Doc from java.io.Externalizable.readExternal.

the stream to read data from in order to restore the object

Exceptions
IOException:
error reading from log stream
ClassNotFoundException:
log stream corrupted
restoreMeback to summary
public void restoreMe(Transaction xact, BasePage undoPage, LogInstant CLRInstant, LimitObjectInput in) throws StandardException, IOException

Implements abstract org.apache.derby.impl.store.raw.data.PageBasicOperation.restoreMe.

restore the before image of the page

Parameters
xact:Transaction

Doc from org.apache.derby.impl.store.raw.data.PageBasicOperation.restoreMe.

the Transaction doing the rollback

undoPage:BasePage

Doc from org.apache.derby.impl.store.raw.data.PageBasicOperation.restoreMe.

the page to rollback changes on

CLRInstant:LogInstant

Doc from org.apache.derby.impl.store.raw.data.PageBasicOperation.restoreMe.

the log instant of this (PageUndo) operation

in:LimitObjectInput

Doc from org.apache.derby.impl.store.raw.data.PageBasicOperation.restoreMe.

optional data for the rollback operation

Exceptions
StandardException:
Standard Derby Error Policy
IOException:
problem reading the complete log record from the input stream
toStringback to summary
public String toString()

Overrides org.apache.derby.impl.store.raw.data.PageBasicOperation.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

undoMeback to summary
public void undoMe(Transaction xact, BasePage undoPage, LogInstant CLRInstant, LimitObjectInput in) throws StandardException, IOException

Implements abstract org.apache.derby.impl.store.raw.data.PhysicalPageOperation.undoMe.

Mark the page as free

Parameters
xact:Transaction

Doc from org.apache.derby.impl.store.raw.data.PhysicalPageOperation.undoMe.

the Transaction doing the rollback

undoPage:BasePage

Doc from org.apache.derby.impl.store.raw.data.PhysicalPageOperation.undoMe.

the page to rollback changes on

CLRInstant:LogInstant

Doc from org.apache.derby.impl.store.raw.data.PhysicalPageOperation.undoMe.

the log instant of this (PageUndo) operation

in:LimitObjectInput

Doc from org.apache.derby.impl.store.raw.data.PhysicalPageOperation.undoMe.

optional data for the rollback operation

Exceptions
StandardException:
Thrown by methods I call
IOException:
Thrown by methods I call
See Also
PhysicalPageOperation#undoMe
writeExternalback to summary
public void writeExternal(ObjectOutput out) throws IOException

Overrides org.apache.derby.impl.store.raw.data.PageBasicOperation.writeExternal.

Implements java.io.Externalizable.writeExternal.

Write this out.

Parameters
out:ObjectOutput

Doc from java.io.Externalizable.writeExternal.

the stream to write the object to

Exceptions
IOException:
error writing to log stream