Top Description Fields Constructors Methods
org.apache.derby.impl.store.access

public Class RAMAccessUndoHandler

extends Object
implements UndoHandler
Class Inheritance
All Implemented Interfaces
org.apache.derby.iapi.store.raw.UndoHandler
Imports
org.apache.derby.shared.common.sanity.SanityManager, org.apache.derby.shared.common.error.StandardException, org.apache.derby.iapi.store.access.AccessFactory, org.apache.derby.iapi.store.access.conglomerate.ConglomerateFactory, .TransactionManager, org.apache.derby.iapi.store.raw.PageKey, .Transaction, .UndoHandler

A class that provides interface to be called when undo of an Insert happens in raw store.

Field Summary

Modifier and TypeField and Description
private RAMAccessManager
access_factory

Fields of the class

Constructor Summary

AccessConstructor and Description
public
RAMAccessUndoHandler(RAMAccessManager input_access_factory)

Constructors for This class:

Method Summary

Modifier and TypeMethod and Description
public void
insertUndoNotify(Transaction
transaction that is being backed out.
xact
,
PageKey
key that uniquely identifies page in question, container key information is embedded in the PageKey
page_key
)

Implements org.apache.derby.iapi.store.raw.UndoHandler.insertUndoNotify.

Interface to be called when an undo of an insert is processed.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

access_factoryback to summary
private RAMAccessManager access_factory

Fields of the class

Constructor Detail

RAMAccessUndoHandlerback to summary
public RAMAccessUndoHandler(RAMAccessManager input_access_factory)

Constructors for This class:

Method Detail

insertUndoNotifyback to summary
public void insertUndoNotify(Transaction xact, PageKey page_key) throws StandardException

Implements org.apache.derby.iapi.store.raw.UndoHandler.insertUndoNotify.

Interface to be called when an undo of an insert is processed.

Implementer of this class provides interface to be called by the raw store when an undo of an insert is processed. Initial implementation will be by Access layer to queue space reclaiming events if necessary when a rows is logically "deleted" as part of undo of the original insert. This undo can happen a lot for many applications if they generate expected and handled duplicate key errors.

It may be useful at some time to include the recordId of the deleted row, but it is not used currently by those notified. The post commit work ultimately processes all rows on the table while it has the latch which is more efficient than one row at time per latch.

It is expected that notifies only happen for pages that caller is interested in. Currently only the following aborted inserts cause a notify: o must be on a non overflow page o if all "user" rows on page are deleted a notify happens (page 1 has a system row so on page one notifies happen if all but the first row is deleted). o if the aborted insert row has either an overflow row or column component then the notify is executed.

Parameters
xact:Transaction

transaction that is being backed out.

page_key:PageKey

key that uniquely identifies page in question, container key information is embedded in the PageKey

Exceptions
StandardException:
Standard exception policy.