| java.lang.Object org.apache.derby.impl.store.access.heap.HeapPostCommit
HeapPostCommit | class HeapPostCommit implements Serviceable(Code) | | The HeapPostCommit class implements the Serviceable protocol.
In it's role as a Serviceable object, it stores the state necessary to
find a page in a heap that may have committed delete's to reclaim.
It looks up the page described, and reclaims space in the conglomerate.
It first trys to clean up any deleted commits on the page. It will then
deallocate the page if no rows remain on the page. All work is done while
holding the latch on the page, and locks are never "waited" on while holding
this latch.
This implementation uses record level locking to reclaim the space.
For the protocols to work correctly all other heap methods must be
prepared for a record or a page to "disappear" if they don't hold a latch and/or
a lock. An example of the problem case is a scan which does not hold locks
on it's current position (group scan works this way), which is positioned
on a row deleted by another xact, it must be prepared to continue the
scan after getting an error if the current page/row disapppears.
|
Method Summary | |
public int | performWork(ContextManager contextMgr) perform the work described in the postcommit work. | public boolean | serviceASAP() The urgency of this post commit work.
This determines where this Serviceable is put in the post commit
queue. | public boolean | serviceImmediately() |
HeapPostCommit | HeapPostCommit(AccessFactory access_factory, Heap heap, long input_page_number)(Code) | | Constructors for This class:
|
performWork | public int performWork(ContextManager contextMgr) throws StandardException(Code) | | perform the work described in the postcommit work.
In this implementation the only work that can be executed by this
post commit processor is this class itself.
Returns Serviceable.DONE when work has completed, orreturns Serviceable.REQUEUE if work needs to be requeued. Parameters: contextMgr - the context manager started by the post commit daemon exception: StandardException - Standard exception policy. |
serviceASAP | public boolean serviceASAP()(Code) | | The urgency of this post commit work.
This determines where this Serviceable is put in the post commit
queue. Post commit work in the heap can be safely delayed until there
is not user work to do.
false, this work should not be serviced ASAP |
serviceImmediately | public boolean serviceImmediately()(Code) | | |
|
|