|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.impl.store.raw.data.EncryptContainerOperation
public class EncryptContainerOperation
Log operation to encrypt a container with a new encryption key or to encrypt an unencrypted container while configuring the database for encryption. Container is synced to the disk when encryption is is successful, there is nothing to do on a redo. If there is crash/error while configuring a database for encryption; original version of the container is put back during undo.
Undoable
,
Serialized FormFormat ID | LOGOP_ENCRYPT_CONTAINER the formatId is written by FormatIdOutputStream when this object is written out by writeObject |
Purpose | to record enctyption of container with a new encryption key. |
Upgrade | |
Disk Layout | containerId(ContainerKey) the id of the container this operation applies to |
Field Summary | |
---|---|
private ContainerKey |
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 | |
---|---|
|
EncryptContainerOperation()
|
protected |
EncryptContainerOperation(RawContainerHandle hdl)
|
Method Summary | |
---|---|
void |
doMe(Transaction tran,
LogInstant instant,
LimitObjectInput in)
Containers are not encryped on a redo. |
Compensation |
generateUndo(Transaction tran,
LimitObjectInput in)
Generate a Compensation (EncryptContainerUndoOperation) that will rollback the changes made to the container during container encryption. |
ByteArray |
getPreparedLog()
the default for prepared log is always null for all the operations that don't have optionalData. |
int |
getTypeFormatId()
Return my format identifier. |
int |
group()
A space operation is a RAWSTORE log record |
boolean |
needsRedo(Transaction xact)
Check if this operation needs to be redone during recovery redo. |
void |
readExternal(java.io.ObjectInput in)
|
void |
releaseResource(Transaction tran)
Release any resource that was acquired for doMe for rollback or recovery redo. |
java.lang.String |
toString()
debug |
void |
undoMe(Transaction tran)
Undo of encrytpion of the container. |
void |
writeExternal(java.io.ObjectOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private ContainerKey containerId
Constructor Detail |
---|
protected EncryptContainerOperation(RawContainerHandle hdl) throws StandardException
StandardException
public EncryptContainerOperation()
Method Detail |
---|
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
public ByteArray getPreparedLog()
getPreparedLog
in interface Loggable
public void releaseResource(Transaction tran)
Loggable
releaseResource
in interface Loggable
public int group()
group
in interface Loggable
public boolean needsRedo(Transaction xact) throws StandardException
needsRedo
in interface Loggable
xact
- the transaction that is doing the rollback
StandardException
- Standard Derby error policyLoggable.releaseResource(org.apache.derby.iapi.store.raw.Transaction)
public int getTypeFormatId()
getTypeFormatId
in interface TypedFormat
public final void doMe(Transaction tran, LogInstant instant, LimitObjectInput in) throws StandardException
doMe
in interface Loggable
tran
- transaction doing the operation.instant
- log instant for this operation.in
- unused by this log operation.
StandardException
- Standard Derby error policypublic void undoMe(Transaction tran) throws StandardException
tran
- the transaction that is undoing this operation
StandardException
- Standard Derby error policypublic Compensation generateUndo(Transaction tran, LimitObjectInput in) throws StandardException
generateUndo
in interface Undoable
tran
- the transaction doing the compensatingin
- optional input; not used by this operation.
StandardException
- Standard Derby error policyLoggable.releaseResource(org.apache.derby.iapi.store.raw.Transaction)
,
Loggable.needsRedo(org.apache.derby.iapi.store.raw.Transaction)
public java.lang.String toString()
toString
in class java.lang.Object
|
Built on Thu 2010-12-23 20:49:13+0000, from revision ??? | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |