Top Description Fields Methods
org.apache.derby.iapi.store.access.conglomerate

public Interface TransactionManager

extends TransactionController
Known Direct Implementers
org.apache.derby.impl.store.access.RAMTransaction
Imports
org.apache.derby.iapi.store.raw.ContainerKey, .Transaction, org.apache.derby.iapi.services.daemon.Serviceable, org.apache.derby.iapi.store.access.ConglomerateController, .SortController, .TransactionController, org.apache.derby.shared.common.error.StandardException

The TransactionManager interface provides methods on the transaction needed by an access method implementer, but should not be visible to clients of a TransactionController.

See Also
TransactionController

Field Summary

Modifier and TypeField and Description
public static final int
LOCK_COMMIT_DURATION

hold lock until end of transaction.

public static final int
LOCK_INSTANT_DURATION

release lock immediately after getting lock.

public static final int
LOCK_MANUAL_DURATION

Allow lock to be released manually prior to end transaction.

public static final int
MODE_NONE

Constant used for the lock_level argument to openConglomerate() and openScan() calls.

Inherited from org.apache.derby.iapi.store.access.TransactionController:
IS_DEFAULTIS_KEPTIS_TEMPORARYISOLATION_NOLOCKISOLATION_READ_COMMITTEDISOLATION_READ_COMMITTED_NOHOLDLOCKISOLATION_READ_UNCOMMITTEDISOLATION_REPEATABLE_READISOLATION_SERIALIZABLEKEEP_LOCKSMODE_RECORDMODE_TABLEOPEN_CONGLOMERATEOPEN_CREATED_SORTSOPEN_SCANOPEN_SORTOPEN_TOTALOPENMODE_BASEROW_INSERT_LOCKEDOPENMODE_FOR_LOCK_ONLYOPENMODE_FORUPDATEOPENMODE_LOCK_NOWAITOPENMODE_LOCK_ROW_NOWAITOPENMODE_SECONDARY_LOCKEDOPENMODE_USE_UPDATE_LOCKSREADONLY_TRANSACTION_INITIALIZATIONRELEASE_LOCKS

Method Summary

Modifier and TypeMethod and Description
public void
addPostCommitWork(Serviceable
The post commit work to do.
work
)

Add to the list of post commit work.

public boolean

Returns:

true if the database has been upgraded to the required level, false otherwise.
checkVersion
(int
required database Engine major version
requiredMajorVersion
,
int
required database Engine minor version
requiredMinorVersion
,
String
Non-null to throw an exception, null to return the state of the version match.
feature
)

Check to see if a database has been upgraded to the required level in order to use a store feature.

public void
closeMe(ScanManager scan)

The ScanManager.close() method has been called on "scan".

public void
closeMe(ConglomerateController conglom_control)

The ConglomerateController.close() method has been called on "conglom_control".

public void
closeMe(SortController sort_control)

The SortController.close() method has been called on "sort_control".

public Conglomerate

Returns:

If successful returns
findExistingConglomerateFromKey
(ContainerKey
container key of target conglomerate.
container_key
)

Return existing Conglomerate after doing lookup by ContainerKey

Throws exception if it can't find a matching conglomerate for the ContainerKey.

public TransactionManager

Returns:

The new internal transaction.
getInternalTransaction
()

Get an Internal transaction.

public Transaction

Returns:

The raw store transaction.
getRawStoreXact
()

Get the Transaction from the Transaction manager.

Inherited from org.apache.derby.iapi.store.access.TransactionController:
abortaddColumnToConglomerateanyoneBlockedcommitcommitNoSynccompressConglomerateconglomerateExistscountOpenscreateAndLoadConglomeratecreateBackingStoreHashtableFromScancreateConglomeratecreateSortcreateXATransactionFromLocalTransactiondebugOpeneddefragmentConglomeratedestroydropConglomeratedropSortfetchMaxOnBtreefindConglomidfindContaineridgetAccessManagergetActiveStateTxIdStringgetContextManagergetDynamicCompiledConglomInfogetFileHandlergetLockSpacegetStaticCompiledConglomInfogetTransactionIdStringgetUserCreateConglomPropListisGlobalisIdleisPristinelogAndDoopenCompiledConglomerateopenCompiledScanopenConglomerateopenGroupFetchScanopenScanopenSortopenSortCostControlleropenSortRowSourceopenSortScanopenStoreCostpurgeConglomeraterecreateAndLoadConglomeratereleaseSavePointrollbackToSavePointsetNoLockWaitsetSavePointstartNestedUserTransaction

Field Detail

LOCK_COMMIT_DURATIONback to summary
public static final int LOCK_COMMIT_DURATION

hold lock until end of transaction.

LOCK_INSTANT_DURATIONback to summary
public static final int LOCK_INSTANT_DURATION

release lock immediately after getting lock.

LOCK_MANUAL_DURATIONback to summary
public static final int LOCK_MANUAL_DURATION

Allow lock to be released manually prior to end transaction.

MODE_NONEback to summary
public static final int MODE_NONE

Constant used for the lock_level argument to openConglomerate() and openScan() calls. Pass in MODE_NONE if you want no table or row locks. This is currently only supported from within access.

Method Detail

addPostCommitWorkback to summary
public void addPostCommitWork(Serviceable work)

Add to the list of post commit work.

Add to the list of post commit work that may be processed after this transaction commits. If this transaction aborts, then the post commit work list will be thrown away. No post commit work will be taken out on a rollback to save point.

This routine simply delegates the work to the Rawstore transaction.

Parameters
work:Serviceable

The post commit work to do.

checkVersionback to summary
public boolean checkVersion(int requiredMajorVersion, int requiredMinorVersion, String feature) throws StandardException

Check to see if a database has been upgraded to the required level in order to use a store feature.

Parameters
requiredMajorVersion:int

required database Engine major version

requiredMinorVersion:int

required database Engine minor version

feature:String

Non-null to throw an exception, null to return the state of the version match.

Returns:boolean

true if the database has been upgraded to the required level, false otherwise.

Exceptions
StandardException:
if the database is not at the require version when feature feature is not null .
closeMeback to summary
public void closeMe(ScanManager scan)

The ScanManager.close() method has been called on "scan".

Take whatever cleanup action is appropriate to a closed scan. It is likely this routine will remove references to the scan object that it was maintaining for cleanup purposes.

closeMeback to summary
public void closeMe(ConglomerateController conglom_control)

The ConglomerateController.close() method has been called on "conglom_control".

Take whatever cleanup action is appropriate to a closed conglomerateController. It is likely this routine will remove references to the ConglomerateController object that it was maintaining for cleanup purposes.

closeMeback to summary
public void closeMe(SortController sort_control)

The SortController.close() method has been called on "sort_control".

Take whatever cleanup action is appropriate to a closed sortController. It is likely this routine will remove references to the SortController object that it was maintaining for cleanup purposes.

findExistingConglomerateFromKeyback to summary
public Conglomerate findExistingConglomerateFromKey(ContainerKey container_key) throws StandardException

Return existing Conglomerate after doing lookup by ContainerKey

Throws exception if it can't find a matching conglomerate for the ContainerKey.

Parameters
container_key:ContainerKey

container key of target conglomerate.

Returns:Conglomerate

If successful returns

Exceptions
StandardException:
Standard exception policy.
getInternalTransactionback to summary
public TransactionManager getInternalTransaction() throws StandardException

Get an Internal transaction.

Start an internal transaction. An internal transaction is a completely separate transaction from the current user transaction. All work done in the internal transaction must be physical (ie. it can be undone physically by the rawstore at the page level, rather than logically undone like btree insert/delete operations). The rawstore guarantee's that in the case of a system failure all open Internal transactions are first undone in reverse order, and then other transactions are undone in reverse order.

Internal transactions are meant to implement operations which, if interupted before completion will cause logical operations like tree searches to fail. This special undo order insures that the state of the tree is restored to a consistent state before any logical undo operation which may need to search the tree is performed.

Returns:TransactionManager

The new internal transaction.

Exceptions
StandardException:
Standard exception policy.
getRawStoreXactback to summary
public Transaction getRawStoreXact() throws StandardException

Get the Transaction from the Transaction manager.

Access methods often need direct access to the "Transaction" - ie. the raw store transaction, so give access to it.

Returns:Transaction

The raw store transaction.

Exceptions
StandardException:
Standard exception policy.