| Modifier and Type | Field and Description |
|---|---|
| protected static final byte | |
| protected ByteArray | |
| protected static final byte | |
| protected transient boolean | |
| protected byte | |
| protected static final byte |
| Access | Constructor and Description |
|---|---|
| protected | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final void | doMe(Transaction
the Transaction tran, LogInstant the log instant of this operation instant, LimitObjectInput optional data in)Implements org. Apply the change indicated by this operation and optional data. |
| protected RawContainerHandle | findContainerForRedoRecovery(RawTransaction xact)
Overrides org. Find container for load tran. |
| public Compensation | generateUndo(Transaction
the transaction doing the rollback tran, LimitObjectInput in)Implements org. Generate a loggable which will undo this change, using the optional input if necessary. |
| public int | getTypeFormatId()
Implements org. Return my format identifier. |
| public void | readExternal(ObjectInput
the stream to read data from in order to restore the object in)Overrides org. Implements java. 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 String | |
| public void | undoMe(Transaction
the transaction that is undoing this operation tran, RawContainerHandle the container handle. This is found here during runtime
undo - in which case we made the CLR and passed in the containerHdl
found in generateUndo and it is passed back to this; or it is found in
the CLR's needsRedo and is passed in and this operation never found the
container. Either case, release resource at the end is safe hdl, LogInstant the log instant of the CLR CLRInstant, LimitObjectInput optional data in)Undo of create, drop or remove |
| public void | writeExternal(ObjectOutput
the stream to write the object to out)Overrides org. Implements java. 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. |
| CREATE | back to summary |
|---|---|
| protected static final byte CREATE | |
| createByteArray | back to summary |
|---|---|
| protected ByteArray createByteArray | |
| DROP | back to summary |
|---|---|
| protected static final byte DROP | |
| hasCreateByteArray | back to summary |
|---|---|
| protected transient boolean hasCreateByteArray | |
| operation | back to summary |
|---|---|
| protected byte operation | |
| REMOVE | back to summary |
|---|---|
| protected static final byte REMOVE | |
| ContainerOperation | back to summary |
|---|---|
| protected ContainerOperation(RawContainerHandle hdl, byte operation) throws StandardException | |
| ContainerOperation | back to summary |
|---|---|
| public ContainerOperation() | |
| doMe | back to summary |
|---|---|
| public final void doMe(Transaction tran, LogInstant instant, LimitObjectInput in) throws StandardException Implements org. Doc from org. Apply the change indicated by this operation and optional data.
If this method fail, the system will be shut down because the log
record has already been written to disk. Moreover, the log record will
be replayed during recovery and this doMe method will be called on the
same page again, so if it fails again, recovery will fail and the
database cannot be started. So it is very important to make sure that
every resource you need, such as disk space, has been acquired before
the logAndDo method is called!
The available() method of in indicates how much data can be read, i.e. how much was originally written.
| |
| findContainerForRedoRecovery | back to summary |
|---|---|
| protected RawContainerHandle findContainerForRedoRecovery(RawTransaction xact) throws StandardException Overrides org. Find container for load tran. If we are in load tran, and the operation is a create, the container may not (should not?) exist yet. We need to recreate it.
| |
| generateUndo | back to summary |
|---|---|
| public Compensation generateUndo(Transaction tran, LimitObjectInput in) throws StandardException Implements org. Doc from org. Generate a loggable which will undo this change, using the optional input if necessary. Note
There are 3 ways to implement a redo-only log record:
Any resource (e.g., latched page) that is needed for the
undoable.undoMe() must be acquired in undoable.generateUndo().
Moreover, that resource must be identified in the compensation
operation, and reacquired in the compensation.needsRedo() method during
recovery redo.
To write a generateUndo operation, find the object that needs to be rolled back. Assuming that it is a page, latch it, put together a Compensation operation with the undoOp set to this operation, and save the page number in the compensation operation, then return the Compensation operation to the logging system. The sequence of events in a rollback of a undoable operation is
The available() method of in indicates how much data can be read, i.e. how much was originally written.
| |
| getTypeFormatId | back to summary |
|---|---|
| public int getTypeFormatId() Implements org. Return my format identifier.
| |
| readExternal | back to summary |
|---|---|
| public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException Overrides org. Implements java. Doc from java. 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.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides org. debug
| |
| undoMe | back to summary |
|---|---|
| public void undoMe(Transaction tran, RawContainerHandle hdl, LogInstant CLRInstant, LimitObjectInput in) throws StandardException Undo of create, drop or remove
| |
| writeExternal | back to summary |
|---|---|
| public void writeExternal(ObjectOutput out) throws IOException Overrides org. Implements java. Doc from java. 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.
| |