class HeapPostCommit extends java.lang.Object implements Serviceable
Modifier and Type | Field and Description |
---|---|
private AccessFactory |
access_factory
Fields of the class
|
private PageKey |
page_key |
DONE, REQUEUE
Constructor and Description |
---|
HeapPostCommit(AccessFactory access_factory,
PageKey page_key)
Constructors for This class:
|
Modifier and Type | Method and Description |
---|---|
int |
performWork(ContextManager contextMgr)
perform the work described in the postcommit work.
|
private void |
purgeCommittedDeletes(HeapController heap_control,
long pageno)
Reclaim space taken of committed deleted rows or aborted inserted rows.
|
boolean |
serviceASAP()
The urgency of this post commit work.
|
boolean |
serviceImmediately()
If this work should be done immediately on the user thread then return true.
|
private AccessFactory access_factory
private PageKey page_key
HeapPostCommit(AccessFactory access_factory, PageKey page_key)
private final void purgeCommittedDeletes(HeapController heap_control, long pageno) throws StandardException
This routine assumes it has been called by an internal transaction which has performed no work so far, and that it has an exclusive intent table lock. It will attempt obtain exclusive row locks on rows marked deleted, where successful those rows can be reclaimed as they must be "committed deleted" or "aborted inserted" rows.
This routine will latch the page and hold the latch due to interface requirement from Page.purgeAtSlot.
heap_control
- The heap, already opened.pageno
- number of page to look for committed deletes.StandardException
- Standard exception policy.Page.purgeAtSlot(int, int, boolean)
public boolean serviceASAP()
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.
serviceASAP
in interface Serviceable
public boolean serviceImmediately()
Serviceable
serviceImmediately
in interface Serviceable
public int performWork(ContextManager contextMgr) throws StandardException
In this implementation the only work that can be executed by this post commit processor is this class itself.
performWork
in interface Serviceable
contextMgr
- the context manager started by the post commit daemonStandardException
- Standard exception policy.Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.