| org.apache.derby.iapi.store.raw.xact.TransactionFactory
All known Subclasses: org.apache.derby.impl.store.raw.xact.XactFactory,
TransactionFactory | public interface TransactionFactory extends Corruptable(Code) | | 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:
- Generating unique transaction identifiers.
- Keeping a list of all open transactions within the raw store.
See Also: RawStoreFactory See Also: Transaction |
Method Summary | |
public 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. | public void | createFinished() | public 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. | public RawTransaction | findUserTransaction(RawStoreFactory rsf, ContextManager contextMgr, String transName) Find a user transaction within the given raw store and the given
contextMgr. | public LogInstant | firstUpdateInstant() The first log instant that belongs to a transaction that is still
active in the raw store. | public LockFactory | getLockFactory() Get the LockFactory to use with this store. | public TransactionInfo[] | getTransactionInfo() | public Formatable | getTransactionTable() Return the transaction table so it can get logged with the checkpoint
log record. | public Object | getXAResourceManager() | public 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. | public boolean | hasPreparedXact() Check if there are any prepared transanctions. | public boolean | noActiveUpdateTransaction() | public void | resetTranId() | public void | rollbackAllTransactions(RawTransaction recoveryTransaction, RawStoreFactory rsf) Rollback and close all transactions known to this factory using a
passed in transaction. | public void | setRawStoreFactory(RawStoreFactory rsf) | public RawTransaction | startGlobalTransaction(RawStoreFactory rsf, ContextManager contextMgr, int format_id, byte[] global_id, byte[] branch_id) Start a new transaction within the given raw store. | public RawTransaction | startInternalTransaction(RawStoreFactory rsf, ContextManager contextMgr) Start a new internal transaction within the given raw store. | public RawTransaction | startNestedReadOnlyUserTransaction(RawStoreFactory rsf, Object compatibilitySpace, ContextManager contextMgr, String transName) Start a new read only transaction within the given raw store. | public RawTransaction | startNestedTopTransaction(RawStoreFactory rsf, ContextManager contextMgr) Start a new nested top transaction within the given raw store. | public RawTransaction | startNestedUpdateUserTransaction(RawStoreFactory rsf, ContextManager contextMgr, String transName) Start a new update transaction within the given raw store. | public RawTransaction | startTransaction(RawStoreFactory rsf, ContextManager contextMgr, String transName) Start a new transaction within the given raw store. | public boolean | submitPostCommitWork(Serviceable work) Submit a post commit work to the post commit daemon. | public void | unblockBackupBlockingOperations() Backup completed. | public void | useTransactionTable(Formatable transactionTable) Use this transaction table, which is gotten from a checkpoint
operation. |
blockBackupBlockingOperations | public boolean blockBackupBlockingOperations(boolean wait) throws StandardException(Code) | | Checks if there any backup blocking operations are in progress and
prevents new ones from starting until the backup is finished.
Parameters: wait - if true, waits for the current backup blocking operations in progress to finish. true if there are no backup blocking operations in progress.false otherwise. exception: StandardException - if interrupted or a runtime exception occurs. |
findTransaction | public boolean findTransaction(TransactionId id, RawTransaction tran)(Code) | | Find a transaction using a transactionId and make the passed in
transaction assume the identity and properties of that transaction.
Used in recovery only.
|
firstUpdateInstant | public LogInstant firstUpdateInstant()(Code) | | The first log instant that belongs to a transaction that is still
active in the raw store. This is the first log record of the longest
running transaction at this moment.
|
getLockFactory | public LockFactory getLockFactory()(Code) | | Get the LockFactory to use with this store.
|
getTransactionTable | public Formatable getTransactionTable()(Code) | | Return the transaction table so it can get logged with the checkpoint
log record.
|
handlePreparedXacts | public void handlePreparedXacts(RawStoreFactory rsf) throws StandardException(Code) | | 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. This includes
creating a context manager for each, pushing a xact context, and
reclaiming update locks on all data changed by the transaction.
Used only in recovery.
exception: StandardException - Cloudscape Standard Error policy |
hasPreparedXact | public boolean hasPreparedXact()(Code) | | Check if there are any prepared transanctions.
MT - unsafe, called during boot, which is single threaded.
true if prepared transactions exist,false otherwise. |
noActiveUpdateTransaction | public boolean noActiveUpdateTransaction()(Code) | | Returns true if the transaction factory has no active updating
transaction
|
rollbackAllTransactions | public void rollbackAllTransactions(RawTransaction recoveryTransaction, RawStoreFactory rsf) throws StandardException(Code) | | Rollback and close all transactions known to this factory using a
passed in transaction. Used only in recovery.
Parameters: recoveryTransaction - the transaction used to rollback exception: StandardException - Cloudscape Standard Error policy |
startGlobalTransaction | public RawTransaction startGlobalTransaction(RawStoreFactory rsf, ContextManager contextMgr, int format_id, byte[] global_id, byte[] branch_id) throws StandardException(Code) | | Start a new transaction within the given raw store. This method will
push a transaction context as described in
RawStoreFactory.startTransaction
Parameters: format_id - the format id part of the Xid - ie. Xid.getFormatId(). Parameters: global_id - the global transaction identifier part of XID - ie.Xid.getGlobalTransactionId(). Parameters: branch_id - The branch qualifier of the Xid - ie.Xid.getBranchQaulifier() Parameters: contextMgr - is the context manager to use. It must be the currentcontext manager. See Also: RawStoreFactory.startGlobalTransaction exception: StandardException - Standard Cloudscape error policy. |
startNestedReadOnlyUserTransaction | public RawTransaction startNestedReadOnlyUserTransaction(RawStoreFactory rsf, Object compatibilitySpace, ContextManager contextMgr, String transName) throws StandardException(Code) | | Start a new read only transaction within the given raw store. This
method will push a transaction context as described in
RawStoreFactory.startNestedTransaction
Parameters: compatibilitySpace - compatibility space to use for locks. Parameters: contextMgr - is the context manager to use. It must be the current context manager. Parameters: transName - is the transaction name. It will be displayed in the transactiontable VTI. See Also: RawStoreFactory.startNestedReadOnlyUserTransaction exception: StandardException - Standard Cloudscape error policy. |
submitPostCommitWork | public boolean submitPostCommitWork(Serviceable work)(Code) | | Submit a post commit work to the post commit daemon.
The work is always added to the deamon, regardless of the
state it returns.
true if the daemon indicates it is being overloaded,false it's happy. must be MT-safe |
unblockBackupBlockingOperations | public void unblockBackupBlockingOperations()(Code) | | Backup completed. Allow backup blocking operations.
|
useTransactionTable | public void useTransactionTable(Formatable transactionTable) throws StandardException(Code) | | Use this transaction table, which is gotten from a checkpoint
operation. Use ONLY during recovery.
exception: StandardException - Standard cloudscape exception policy. |
|
|