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

public final Class AllocPageOperation

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

Field Summary

Modifier and TypeField and Description
protected int
protected long
protected int

Constructor Summary

AccessConstructor and Description
pack-priv
AllocPageOperation(AllocPage allocPage, long pageNumber, int doStatus, int undoStatus)

public

Method Summary

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

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

Allocate/deallocate/free this page number

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.

The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays.

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.

Undo the change indicated by this log operation and optional data.

public String
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.

Allocate/deallocate/free this page number.

public void
writeExternal(ObjectOutput
the stream to write the object to
out
)

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

Implements java.io.Externalizable.writeExternal.

The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.

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

Field Detail

doStatusback to summary
protected int doStatus
newPageNumberback to summary
protected long newPageNumber
undoStatusback to summary
protected int undoStatus

Constructor Detail

AllocPageOperationback to summary
pack-priv AllocPageOperation(AllocPage allocPage, long pageNumber, int doStatus, int undoStatus) throws StandardException
AllocPageOperationback to summary
public AllocPageOperation()

Method Detail

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

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

Allocate/deallocate/free this page number

Parameters
tran: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:
container Handle is not active
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.

Doc from java.io.Externalizable.readExternal.

The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. The readExternal method must read the values in the same sequence and with the same types as were written by writeExternal.

Parameters
in:ObjectInput

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

Exceptions
IOException:
error reading from log stream
ClassNotFoundException:
cannot read object from input
restoreMeback to summary
public void restoreMe(Transaction xact, BasePage undoPage, LogInstant CLRinstant, LimitObjectInput in)

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

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

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

Parameters
xact:Transaction

the Transaction doing the rollback

undoPage:BasePage

the page to rollback changes on

CLRinstant:LogInstant

the log instant of this (PageUndo) operation

in:LimitObjectInput

optional data for the rollback operation

toStringback to summary
public String toString()

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

debug

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object

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

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

Allocate/deallocate/free this page number.

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
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.

Doc from java.io.Externalizable.writeExternal.

The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.

Parameters
out:ObjectOutput

the stream to write the object to

Exceptions
IOException:
Includes any I/O exceptions that may occur