Class ContainerUndoOperation
java.lang.Object
org.apache.derby.impl.store.raw.data.ContainerBasicOperation
org.apache.derby.impl.store.raw.data.ContainerUndoOperation
- All Implemented Interfaces:
Externalizable
,Serializable
,Formatable
,TypedFormat
,Compensation
,Loggable
A Container undo operation rolls back the change of a Container operation
- See Also:
-
Field Summary
FieldsFields inherited from class org.apache.derby.impl.store.raw.data.ContainerBasicOperation
containerHdl, containerId
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
ConstructorsConstructorDescriptionSet up a Container undo operation during run time rollback -
Method Summary
Modifier and TypeMethodDescriptionfinal void
doMe
(Transaction xact, LogInstant instant, LimitObjectInput in) Apply the undo operation, in this implementation of the RawStore, it can only call the undoMe method of undoOpint
Return my format identifier.int
group()
A space operation is a RAWSTORE log recordvoid
void
releaseResource
(Transaction xact) Release any resource that was acquired for doMe for rollback or recovery redo.void
Set up a Container undo operation during recovery redo.void
Methods inherited from class org.apache.derby.impl.store.raw.data.ContainerBasicOperation
findContainer, findContainerForRedoRecovery, getPreparedLog, needsRedo, toString
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
getPreparedLog, needsRedo
-
Field Details
-
undoOp
-
-
Constructor Details
-
ContainerUndoOperation
public ContainerUndoOperation(RawContainerHandle hdl, ContainerOperation op) throws StandardException Set up a Container undo operation during run time rollback- Throws:
StandardException
- container Handle is not active
-
ContainerUndoOperation
public ContainerUndoOperation()
-
-
Method Details
-
writeExternal
- Specified by:
writeExternal
in interfaceExternalizable
- Overrides:
writeExternal
in classContainerBasicOperation
- Throws:
IOException
-
readExternal
- Specified by:
readExternal
in interfaceExternalizable
- Overrides:
readExternal
in classContainerBasicOperation
- Throws:
IOException
- cannot read log record from log streamClassNotFoundException
- cannot read ByteArray object
-
getTypeFormatId
public int getTypeFormatId()Return my format identifier.- Specified by:
getTypeFormatId
in interfaceTypedFormat
- Returns:
- The identifier. (A UUID stuffed in an array of 16 bytes).
-
setUndoOp
Set up a Container undo operation during recovery redo.- Specified by:
setUndoOp
in interfaceCompensation
- Parameters:
op
- the Undoable operation- See Also:
-
doMe
public final void doMe(Transaction xact, LogInstant instant, LimitObjectInput in) throws StandardException, IOException Apply the undo operation, in this implementation of the RawStore, it can only call the undoMe method of undoOp- Specified by:
doMe
in interfaceLoggable
- Parameters:
xact
- the Transaction that is doing the rollbackinstant
- the log instant of this compenstaion operationin
- optional data- Throws:
IOException
- Can be thrown by any of the methods of ObjectInput.StandardException
- Standard Derby error policy.- See Also:
-
releaseResource
Description copied from interface: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 interfaceLoggable
- Overrides:
releaseResource
in classContainerBasicOperation
-
group
public int group()Description copied from class:ContainerBasicOperation
A space operation is a RAWSTORE log record- Specified by:
group
in interfaceLoggable
- Overrides:
group
in classContainerBasicOperation
-