java.lang.Object
org.apache.derby.impl.store.raw.data.ContainerBasicOperation
org.apache.derby.impl.store.raw.data.ContainerUndoOperation
- All Implemented Interfaces:
- org.apache.derby.iapi.store.raw.Compensation, java.io.Externalizable, org.apache.derby.iapi.services.io.Formatable, org.apache.derby.iapi.store.raw.Loggable, java.io.Serializable, org.apache.derby.iapi.services.io.TypedFormat
- public class ContainerUndoOperation
- extends ContainerBasicOperation
- implements org.apache.derby.iapi.store.raw.Compensation
A Container undo operation rolls back the change of a Container operation
| 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 |
undoOp
private transient ContainerOperation undoOp
ContainerUndoOperation
public ContainerUndoOperation(org.apache.derby.iapi.store.raw.data.RawContainerHandle hdl,
ContainerOperation op)
throws org.apache.derby.iapi.error.StandardException
- Set up a Container undo operation during run time rollback
ContainerUndoOperation
public ContainerUndoOperation()
writeExternal
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
- Description copied from interface:
java.io.Externalizable
- This method is responsible for writing the instance data of an object
to the passed in stream. Note that this stream is not a subclass of
OutputStream, but rather is a class that implements the
ObjectOutput interface. That interface provides a
number of methods
for writing Java data values to a stream.
Not that the implementation of this method must be coordinated with
the implementation of readExternal.
- Specified by:
writeExternal in interface java.io.Externalizable- Overrides:
writeExternal in class ContainerBasicOperation
readExternal
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
- Description copied from interface:
java.io.Externalizable
- This method restores an object's state by reading in the instance data
for the object from the passed in stream. Note that this stream is not
a subclass of
InputStream, but rather is a class that
implements
the ObjectInput interface. That interface provides a
mechanism for
reading in Java data types from a stream.
Note that this method must be compatible with writeExternal.
It must read back the exact same types that were written by that
method in the exact order they were written.
If this method needs to read back an object instance, then the class
for that object must be found and loaded. If that operation fails,
then this method throws a ClassNotFoundException
- Specified by:
readExternal in interface java.io.Externalizable- Overrides:
readExternal in class ContainerBasicOperation
getTypeFormatId
public int getTypeFormatId()
- Return my format identifier.
- Specified by:
getTypeFormatId in interface org.apache.derby.iapi.services.io.TypedFormat
setUndoOp
public void setUndoOp(org.apache.derby.iapi.store.raw.Undoable op)
- Set up a Container undo operation during recovery redo.
- Specified by:
setUndoOp in interface org.apache.derby.iapi.store.raw.Compensation
doMe
public final void doMe(org.apache.derby.iapi.store.raw.Transaction xact,
org.apache.derby.iapi.store.raw.log.LogInstant instant,
org.apache.derby.iapi.services.io.LimitObjectInput in)
throws org.apache.derby.iapi.error.StandardException,
java.io.IOException
- Apply the undo operation, in this implementation of the
RawStore, it can only call the undoMe method of undoOp
- Specified by:
doMe in interface org.apache.derby.iapi.store.raw.Loggable
releaseResource
public void releaseResource(org.apache.derby.iapi.store.raw.Transaction xact)
- Description copied from interface:
org.apache.derby.iapi.store.raw.Loggable
- 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.
- Specified by:
releaseResource in interface org.apache.derby.iapi.store.raw.Loggable- Overrides:
releaseResource in class ContainerBasicOperation
group
public int group()
- Description copied from interface:
org.apache.derby.iapi.store.raw.Loggable
- Get the loggable's group value
- Specified by:
group in interface org.apache.derby.iapi.store.raw.Loggable- Overrides:
group in class ContainerBasicOperation