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

public Class EncryptContainerUndoOperation

extends Object
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.StoredFormatIds, .LimitObjectInput, org.apache.derby.iapi.store.raw.Compensation, .Loggable, .Transaction, .Undoable, org.apache.derby.iapi.util.ByteArray, org.apache.derby.iapi.store.raw.log.LogInstant, org.apache.derby.shared.common.error.StandardException, java.io.ObjectOutput, .ObjectInput, .IOException

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

Field Summary

Modifier and TypeField and Description
private transient EncryptContainerOperation

Constructor Summary

AccessConstructor and Description
public
EncryptContainerUndoOperation(EncryptContainerOperation
Encrypt contaner operatation that is to be undone.
op
)

Set up a Encrypt 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 ByteArray
getPreparedLog()

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

the default for prepared log is always null for all the operations that don't have optionalData.

public int
public int
group()

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

Get the loggable's group value

public boolean

Returns:

true, if this operation needs to be redone during recovery.
needsRedo
(Transaction
the transaction that is doing the rollback
xact
)

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

Check if this operation needs to be redone during recovery redo.

public void
readExternal(ObjectInput
the stream to read data from in order to restore the object
in
)

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)

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 String
toString()

Overrides java.lang.Object.toString.

DEBUG: Print self.

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

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 java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

undoOpback to summary
private transient EncryptContainerOperation undoOp

Constructor Detail

EncryptContainerUndoOperationback to summary
public EncryptContainerUndoOperation(EncryptContainerOperation op)

Set up a Encrypt Container undo operation during run time rollback

Parameters
op:EncryptContainerOperation

Encrypt contaner operatation that is to be undone.

EncryptContainerUndoOperationback to summary
public EncryptContainerUndoOperation()

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 policy.
IOException:
Can be thrown by any of the methods of ObjectInput.
See Also
EncryptContainerOperation#generateUndo
getPreparedLogback to summary
public ByteArray getPreparedLog()

Implements org.apache.derby.iapi.store.raw.Loggable.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

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()

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

needsRedoback to summary
public boolean needsRedo(Transaction xact) throws StandardException

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

Check if this operation needs to be redone during recovery redo. Returns true if this op should be redone during recovery redo,

Parameters
xact:Transaction

the transaction that is doing the rollback

Returns:boolean

true, if this operation needs to be redone during recovery.

Exceptions
StandardException:
Standard Derby error policy
readExternalback to summary
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException

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)

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

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

DEBUG: Print self.

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object

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

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