Class EncryptContainerUndoOperation
java.lang.Object
org.apache.derby.impl.store.raw.data.EncryptContainerUndoOperation
- All Implemented Interfaces:
Externalizable, Serializable, Formatable, TypedFormat, Compensation, Loggable
A Encrypt Container undo operation rolls back the change of a
Encrypt Container operation
- See Also:
-
Field Summary
FieldsFields inherited from interface Loggable
ABORT, BI_LOG, CHECKSUM, COMMIT, COMPENSATION, FILE_RESOURCE, FIRST, LAST, PREPARE, RAWSTORE, XA_NEEDLOCK -
Constructor Summary
ConstructorsConstructorDescriptionSet up a Encrypt Container undo operation during run time rollback -
Method Summary
Modifier and TypeMethodDescriptionfinal voiddoMe(Transaction xact, LogInstant instant, LimitObjectInput in) Apply the undo operation, in this implementation of the RawStore, it can only call the undoMe method of undoOpthe default for prepared log is always null for all the operations that don't have optionalData.intReturn my format identifier.intgroup()Get the loggable's group valuebooleanneedsRedo(Transaction xact) Check if this operation needs to be redone during recovery redo.voidvoidreleaseResource(Transaction xact) Release any resource that was acquired for doMe for rollback or recovery redo.voidSet up a Container undo operation during recovery redo.toString()DEBUG: Print self.void
-
Field Details
-
undoOp
-
-
Constructor Details
-
EncryptContainerUndoOperation
Set up a Encrypt Container undo operation during run time rollback- Parameters:
op- Encrypt contaner operatation that is to be undone.
-
EncryptContainerUndoOperation
public EncryptContainerUndoOperation()
-
-
Method Details
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOException- cannot read log record from log streamClassNotFoundException- cannot read ByteArray object
-
getTypeFormatId
public int getTypeFormatId()Return my format identifier.- Specified by:
getTypeFormatIdin 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:
setUndoOpin interfaceCompensation- Parameters:
op- the Undoable operation- See Also:
-
needsRedo
Check if this operation needs to be redone during recovery redo. Returns true if this op should be redone during recovery redo,- Specified by:
needsRedoin interfaceLoggable- Parameters:
xact- the transaction that is doing the rollback- Returns:
- true, if this operation needs to be redone during recovery.
- Throws:
StandardException- Standard Derby error policy- See Also:
-
getPreparedLog
the default for prepared log is always null for all the operations that don't have optionalData. If an operation has optional data, the operation need to prepare the optional data for this method. Encrypt Conatainer Undo Operation has no optional data to write out- Specified by:
getPreparedLogin interfaceLoggable
-
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:
doMein 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 policy.- See Also:
-
releaseResource
Description copied from interface:LoggableRelease 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:
releaseResourcein interfaceLoggable
-
group
-
toString
-