Page#insertAtSlot
| Modifier and Type | Field and Description |
|---|---|
| protected int | |
| protected byte | |
| protected transient ByteArray | |
| protected transient int | startColumn
next column that need to be inserted. |
| Access | Constructor and Description |
|---|---|
| pack-priv | InsertOperation(RawTransaction t, BasePage page, int slot, int recordId, Object[] row, FormatableBitSet validColumns, LogicalUndo undo, byte insertFlag, int startColumn, boolean isLongColumn, int realStartColumn, DynamicByteArrayOutputStream logBuffer, int realSpaceOnPage, int overflowThreshold)
|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | doMe(Transaction
the Transaction xact, LogInstant the log instant of this operation instant, LimitObjectInput optional data in)Implements org. Apply the change indicated by this operation and optional data. |
| public int | |
| public ByteArray | getPreparedLog()
Overrides org. Implements org. The log operations are responsible to create the ByteArray, and the log operations should write out any optional data for the change to the ByteArray. |
| 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. Read this in |
| public void | restoreLoggedRow(Object[]
an IN/OUT parameter, caller passed in the row with
the correct column number and type, the log operation will restore the
row with the optional data stored in the log record. row, LimitObjectInput in)Implements org. Restore the row stored in the optional data of the log record. |
| public void | restoreMe(Transaction
the Transaction doing the rollback xact, BasePage the page to rollback changes on undoPage, LogInstant the log instant of this (PageUndo) operation CLRinstant, LimitObjectInput optional data for the rollback operation in)Implements abstract org. restore the before image of the page |
| public String | toString()
Overrides org. DEBUG: Print self. |
| public void | undoMe(Transaction
the Transaction doing the rollback xact, BasePage the page to rollback changes on undoPage, int the recordId to rollback changes on undoRecordId, LogInstant the log instant of this (PageUndo) operation CLRInstant, LimitObjectInput optional data for the rollback operation in)Implements abstract org. Undo the insert by simply marking the just inserted record as deleted. |
| public void | writeExternal(ObjectOutput
the stream to write the object to out)Overrides org. Implements java. Write this out. |
| private void | writeOptionalDataToBuffer(RawTransaction t, DynamicByteArrayOutputStream logBuffer, Object[] row, FormatableBitSet validColumns, boolean isLongColumn, int realStartColumn, int realSpaceOnPage, int overflowThreshold)
Writes out the row that is to be inserted as the optional data. |
| doMeSlot | back to summary |
|---|---|
| protected int doMeSlot | |
| insertFlag | back to summary |
|---|---|
| protected byte insertFlag | |
| preparedLog | back to summary |
|---|---|
| protected transient ByteArray preparedLog | |
| startColumn | back to summary |
|---|---|
| protected transient int startColumn next column that need to be inserted. | |
| InsertOperation | back to summary |
|---|---|
| pack-priv InsertOperation(RawTransaction t, BasePage page, int slot, int recordId, Object[] row, FormatableBitSet validColumns, LogicalUndo undo, byte insertFlag, int startColumn, boolean isLongColumn, int realStartColumn, DynamicByteArrayOutputStream logBuffer, int realSpaceOnPage, int overflowThreshold) throws StandardException | |
| InsertOperation | back to summary |
|---|---|
| public InsertOperation() | |
| doMe | back to summary |
|---|---|
| public void doMe(Transaction xact, LogInstant instant, LimitObjectInput in) throws StandardException, IOException 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.
| |
| getNextStartColumn | back to summary |
|---|---|
| public int getNextStartColumn() | |
| getPreparedLog | back to summary |
|---|---|
| public ByteArray getPreparedLog() Overrides org. Implements org. Doc from org. The log operations are responsible to create the ByteArray, and the log operations should write out any optional data for the change to the ByteArray. The ByteArray can be prepared when the log operation is constructed, or it can be prepared when getPreparedLog() is called. Called by the log manager to allow the log operation to pass the buffer which contains optional data that will be available in to doMe() methods. | |
| 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. Read this in
| |
| restoreLoggedRow | back to summary |
|---|---|
| public void restoreLoggedRow(Object[] row, LimitObjectInput in) throws StandardException, IOException Implements org. Restore the row stored in the optional data of the log record.
| |
| restoreMe | back to summary |
|---|---|
| public void restoreMe(Transaction xact, BasePage undoPage, LogInstant CLRinstant, LimitObjectInput in) throws StandardException, IOException Implements abstract org. restore the before image of the page
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides org. DEBUG: Print self.
| |
| undoMe | back to summary |
|---|---|
| public void undoMe(Transaction xact, BasePage undoPage, int undoRecordId, LogInstant CLRInstant, LimitObjectInput in) throws StandardException, IOException Implements abstract org. Undo the insert by simply marking the just inserted record as deleted. All logical undo logic has already been taken care of by generateUndo.
| |
| writeExternal | back to summary |
|---|---|
| public void writeExternal(ObjectOutput out) throws IOException Overrides org. Implements java. Write this out.
| |
| writeOptionalDataToBuffer | back to summary |
|---|---|
| private void writeOptionalDataToBuffer(RawTransaction t, DynamicByteArrayOutputStream logBuffer, Object[] row, FormatableBitSet validColumns, boolean isLongColumn, int realStartColumn, int realSpaceOnPage, int overflowThreshold) throws StandardException, IOException Writes out the row that is to be inserted as the optional data.
| |