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

public Class ContainerUndoOperation

extends ContainerBasicOperation
implements Compensation
Class Inheritance
All Implemented Interfaces
org.apache.derby.iapi.store.raw.Compensation, org.apache.derby.iapi.store.raw.Loggable, org.apache.derby.iapi.services.io.Formatable, org.apache.derby.iapi.services.io.TypedFormat, java.io.Externalizable, java.io.Serializable
Imports
org.apache.derby.shared.common.sanity.SanityManager, org.apache.derby.iapi.services.io.FormatIdUtil, .StoredFormatIds, .LimitObjectInput, org.apache.derby.iapi.store.raw.Compensation, .ContainerHandle, .Loggable, .Transaction, .Undoable, org.apache.derby.iapi.store.raw.data.RawContainerHandle, org.apache.derby.iapi.store.raw.log.LogInstant, org.apache.derby.shared.common.error.StandardException, java.io.InputStream, .ObjectOutput, .ObjectInput, .IOException

A Container undo operation rolls back the change of a Container operation

Field Summary

Modifier and TypeField and Description
private transient ContainerOperation
Inherited from org.apache.derby.impl.store.raw.data.ContainerBasicOperation:
containerHdlcontainerId

Constructor Summary

AccessConstructor and Description
public
ContainerUndoOperation(RawContainerHandle hdl, ContainerOperation op)

Set up a Container undo operation during run time rollback

public

Method Summary

Modifier and TypeMethod and Description
public final void
doMe(Transaction
the Transaction that is doing the rollback
xact
,
LogInstant
the log instant of this compenstaion operation
instant
,
LimitObjectInput
optional data
in
)

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

Apply the undo operation, in this implementation of the RawStore, it can only call the undoMe method of undoOp

public int
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.ContainerBasicOperation.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
releaseResource(Transaction xact)

Overrides org.apache.derby.impl.store.raw.data.ContainerBasicOperation.releaseResource.

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

Release any resource that was acquired for doMe for rollback or recovery redo.

public void
setUndoOp(Undoable
the Undoable operation
op
)

Implements org.apache.derby.iapi.store.raw.Compensation.setUndoOp.

Set up a Container undo operation during recovery redo.

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

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

Field Detail

undoOpback to summary
private transient ContainerOperation undoOp

Constructor Detail

ContainerUndoOperationback to summary
public ContainerUndoOperation(RawContainerHandle hdl, ContainerOperation op) throws StandardException

Set up a Container undo operation during run time rollback

Exceptions
StandardException:
container Handle is not active
ContainerUndoOperationback to summary
public ContainerUndoOperation()

Method Detail

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

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

Apply the undo operation, in this implementation of the RawStore, it can only call the undoMe method of undoOp

Parameters
xact:Transaction

the Transaction that is doing the rollback

instant:LogInstant

the log instant of this compenstaion operation

in:LimitObjectInput

optional data

Exceptions
StandardException:
Standard Derby error policy.
IOException:
Can be thrown by any of the methods of ObjectInput.
See Also
ContainerOperation#generateUndo
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).

groupback to summary
public int group()

Overrides org.apache.derby.impl.store.raw.data.ContainerBasicOperation.group.

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

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

Get the loggable's group value

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

Overrides org.apache.derby.impl.store.raw.data.ContainerBasicOperation.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:
cannot read log record from log stream
ClassNotFoundException:
cannot read ByteArray object
releaseResourceback to summary
public void releaseResource(Transaction xact)

Overrides org.apache.derby.impl.store.raw.data.ContainerBasicOperation.releaseResource.

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

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

Release any resource that was acquired for doMe for rollback or recovery redo. This resource is acquired in either generateUndo (if this is a compensation operation during run time rollback or recovery rollback) or in needsRedo (if this is during recovery redo). The run time transaction context should have all the resource already acquird for run time roll forward, so there is no need to releaseResource during run time roll forward. This method must be safe to be called multiple times.

setUndoOpback to summary
public void setUndoOp(Undoable op)

Implements org.apache.derby.iapi.store.raw.Compensation.setUndoOp.

Set up a Container undo operation during recovery redo.

Parameters
op:Undoable

Doc from org.apache.derby.iapi.store.raw.Compensation.setUndoOp.

the Undoable operation

writeExternalback to summary
public void writeExternal(ObjectOutput out) throws IOException

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