|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface TransactionFactory
This module is intended to be used only within the RawStore. RawStore functionality is accessed only through the RawStoreFactory interface. The transaction manager is responsible for:
RawStoreFactory,
Transaction| Field Summary | |
|---|---|
static java.lang.String |
MODULE
|
| Method Summary | |
|---|---|
boolean |
blockBackupBlockingOperations(boolean wait)
Checks if there any backup blocking operations are in progress and prevents new ones from starting until the backup is finished. |
void |
createFinished()
Database creation finished |
boolean |
findTransaction(TransactionId id,
RawTransaction tran)
Find a transaction using a transactionId and make the passed in transaction assume the identity and properties of that transaction. |
RawTransaction |
findUserTransaction(RawStoreFactory rsf,
ContextManager contextMgr,
java.lang.String transName)
Find a user transaction within the given raw store and the given contextMgr. |
LogInstant |
firstUpdateInstant()
The first log instant that belongs to a transaction that is still active in the raw store. |
LockFactory |
getLockFactory()
Get the LockFactory to use with this store. |
TransactionInfo[] |
getTransactionInfo()
|
Formatable |
getTransactionTable()
Return the transaction table so it can get logged with the checkpoint log record. |
java.lang.Object |
getXAResourceManager()
Return the module providing XAresource interface to the transaction table. |
void |
handlePreparedXacts(RawStoreFactory rsf)
Run through all prepared transactions known to this factory and restore their state such that they remain after recovery, and can be found and handled by a XA transaction manager. |
boolean |
hasPreparedXact()
Check if there are any prepared transanctions. |
boolean |
noActiveUpdateTransaction()
Returns true if the transaction factory has no active updating transaction |
void |
resetTranId()
Reset any resettable transaction Id |
void |
rollbackAllTransactions(RawTransaction recoveryTransaction,
RawStoreFactory rsf)
Rollback and close all transactions known to this factory using a passed in transaction. |
void |
setRawStoreFactory(RawStoreFactory rsf)
make Transaction factory aware of which raw store factory it belongs to |
RawTransaction |
startGlobalTransaction(RawStoreFactory rsf,
ContextManager contextMgr,
int format_id,
byte[] global_id,
byte[] branch_id)
Start a new transaction within the given raw store. |
RawTransaction |
startInternalTransaction(RawStoreFactory rsf,
ContextManager contextMgr)
Start a new internal transaction within the given raw store. |
RawTransaction |
startNestedReadOnlyUserTransaction(RawStoreFactory rsf,
CompatibilitySpace compatibilitySpace,
ContextManager contextMgr,
java.lang.String transName)
Start a new read only transaction within the given raw store. |
RawTransaction |
startNestedTopTransaction(RawStoreFactory rsf,
ContextManager contextMgr)
Start a new nested top transaction within the given raw store. |
RawTransaction |
startNestedUpdateUserTransaction(RawStoreFactory rsf,
ContextManager contextMgr,
java.lang.String transName,
boolean flush_log_on_xact_end)
Start a new update transaction within the given raw store. |
RawTransaction |
startTransaction(RawStoreFactory rsf,
ContextManager contextMgr,
java.lang.String transName)
Start a new transaction within the given raw store. |
boolean |
submitPostCommitWork(Serviceable work)
Submit a post commit work to the post commit daemon. |
void |
unblockBackupBlockingOperations()
Backup completed. |
void |
useTransactionTable(Formatable transactionTable)
Use this transaction table, which is gotten from a checkpoint operation. |
| Methods inherited from interface org.apache.derby.iapi.store.raw.Corruptable |
|---|
markCorrupt |
| Field Detail |
|---|
static final java.lang.String MODULE
| Method Detail |
|---|
LockFactory getLockFactory()
java.lang.Object getXAResourceManager()
throws StandardException
StandardException - Standard Derby exception policy.
RawTransaction startTransaction(RawStoreFactory rsf,
ContextManager contextMgr,
java.lang.String transName)
throws StandardException
contextMgr - is the context manager to use. It must be the current
context manager.transName - is the transaction name. It will be displayed in the
transactiontable VTI.
StandardException - Standard Derby error policy.RawStoreFactory.startTransaction(org.apache.derby.iapi.services.context.ContextManager, java.lang.String)
RawTransaction startNestedReadOnlyUserTransaction(RawStoreFactory rsf,
CompatibilitySpace compatibilitySpace,
ContextManager contextMgr,
java.lang.String transName)
throws StandardException
compatibilitySpace - compatibility space to use for locks.contextMgr - is the context manager to use. It must be
the current context manager.transName - is the transaction name. It will be
displayed in the transactiontable VTI.
StandardException - Standard Derby error policy.RawStoreFactory.startNestedReadOnlyUserTransaction(org.apache.derby.iapi.services.locks.CompatibilitySpace, org.apache.derby.iapi.services.context.ContextManager, java.lang.String)
RawTransaction startNestedUpdateUserTransaction(RawStoreFactory rsf,
ContextManager contextMgr,
java.lang.String transName,
boolean flush_log_on_xact_end)
throws StandardException
contextMgr - is the context manager to use. It must
be the current context manager.transName - is the transaction name. It will be
displayed in the transactiontable VTI.flush_log_on_xact_end - By default should the transaction commit
and abort be synced to the log. Normal
usage should pick true, unless there
is specific performance need and usage
works correctly if a commit can be
lost on system crash.
StandardException - Standard Derby error policy.RawStoreFactory.startNestedUpdateUserTransaction(org.apache.derby.iapi.services.context.ContextManager, java.lang.String, boolean)
RawTransaction startGlobalTransaction(RawStoreFactory rsf,
ContextManager contextMgr,
int format_id,
byte[] global_id,
byte[] branch_id)
throws StandardException
format_id - the format id part of the Xid - ie. Xid.getFormatId().global_id - the global transaction identifier part of XID - ie.
Xid.getGlobalTransactionId().branch_id - The branch qualifier of the Xid - ie.
Xid.getBranchQaulifier()contextMgr - is the context manager to use. It must be the current
context manager.
StandardException - Standard Derby error policy.RawStoreFactory.startGlobalTransaction(org.apache.derby.iapi.services.context.ContextManager, int, byte[], byte[])
RawTransaction findUserTransaction(RawStoreFactory rsf,
ContextManager contextMgr,
java.lang.String transName)
throws StandardException
StandardException - Standard Derby error policy.RawStoreFactory.findUserTransaction(org.apache.derby.iapi.services.context.ContextManager, java.lang.String),
RawStoreFactory.startTransaction(org.apache.derby.iapi.services.context.ContextManager, java.lang.String)
RawTransaction startNestedTopTransaction(RawStoreFactory rsf,
ContextManager contextMgr)
throws StandardException
StandardException - Standard Derby error policy.RawStoreFactory.startTransaction(ContextManager, String)
RawTransaction startInternalTransaction(RawStoreFactory rsf,
ContextManager contextMgr)
throws StandardException
StandardException - Standard Derby error policy.RawStoreFactory.startTransaction(org.apache.derby.iapi.services.context.ContextManager, java.lang.String)
boolean findTransaction(TransactionId id,
RawTransaction tran)
void resetTranId()
throws StandardException
StandardException - Standard Derby error policy.LogInstant firstUpdateInstant()
void handlePreparedXacts(RawStoreFactory rsf)
throws StandardException
StandardException - Derby Standard Error policy
void rollbackAllTransactions(RawTransaction recoveryTransaction,
RawStoreFactory rsf)
throws StandardException
recoveryTransaction - the transaction used to rollback
StandardException - Derby Standard Error policyboolean submitPostCommitWork(Serviceable work)
void setRawStoreFactory(RawStoreFactory rsf)
throws StandardException
StandardExceptionboolean noActiveUpdateTransaction()
boolean hasPreparedXact()
MT - unsafe, called during boot, which is single threaded.
void createFinished()
throws StandardException
StandardException - Standard Derby exception policy.Formatable getTransactionTable()
void useTransactionTable(Formatable transactionTable)
throws StandardException
StandardException - Standard Derby exception policy.TransactionInfo[] getTransactionInfo()
AccessFactory.getTransactionInfo()
boolean blockBackupBlockingOperations(boolean wait)
throws StandardException
wait - if true, waits for the current backup blocking
operations in progress to finish.
StandardException - if interrupted or a runtime exception occurs.void unblockBackupBlockingOperations()
|
Built on Wed 2013-06-12 15:21:56+0000, from revision ??? | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||