| java.lang.Object org.apache.derby.impl.store.raw.xact.XactFactory
Method Summary | |
protected void | add(Xact xact, boolean excludeMe) | protected void | addUpdateTransaction(TransactionId id, RawTransaction t, int transactionStatus) Add a transaction to the list of transactions that has updated
the raw store. | protected boolean | blockBackup(boolean wait) Block the online backup. | public boolean | blockBackupBlockingOperations(boolean wait) Checks if there are any backup blocking operations in progress and
prevents new ones from starting until the backup is finished. | public void | boot(boolean create, Properties properties) | public boolean | canSupport(Properties startParams) | public void | createFinished() | public boolean | findTransaction(TransactionId id, RawTransaction tran) Find the TransactionTableEntry with the given ID and make the passed in
transaction assume the identity and properties of that
TransactionTableEntry. | public RawTransaction | findUserTransaction(RawStoreFactory rsf, ContextManager contextMgr, String transName) | public LogInstant | firstUpdateInstant() Get the earliest log instant that is still active, ie, the first log
record logged by the earliest transaction that is still active. | public boolean | flushLogOnCommit(String contextName) | public LockFactory | getLockFactory() Get the LockFactory to use with this store. | final LockingPolicy | getLockingPolicy(int mode, int isolation, boolean stricterOk) Get a locking policy for a transaction. | public TransactionInfo[] | getTransactionInfo() | public Formatable | getTransactionTable() | 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 in the
transaction table. | public boolean | inDatabaseCreation() | public UUID | makeNewUUID() | public StandardException | markCorrupt(StandardException originalError) Really this is just a convience routine for callers that might not
have access to a log factory. | public boolean | noActiveUpdateTransaction() Returns true if there is no in flight updating tranasaction. | protected void | prepareTransaction(TransactionId id) Change state of transaction to prepared. | protected void | pushTransactionContext(ContextManager cm, String contextName, Xact xact, boolean abortAll, RawStoreFactory rsf, boolean excludeMe) Create a new RawTransaction, a context for it and push the context
onto the current context manager. | protected boolean | remove(TransactionId xactId) | protected void | removeUpdateTransaction(TransactionId id) Remove a transaction from the list of transactions that has updated the
raw store. | public void | resetTranId() | public void | rollbackAllTransactions(RawTransaction recoveryTransaction, RawStoreFactory rsf) Rollback all active transactions that has updated the raw store. | public void | setNewTransactionId(TransactionId oldxid, Xact t) | public void | setRawStoreFactory(RawStoreFactory rsf) | public RawTransaction | startGlobalTransaction(RawStoreFactory rsf, ContextManager cm, int format_id, byte[] global_id, byte[] branch_id) | public RawTransaction | startInternalTransaction(RawStoreFactory rsf, ContextManager cm) | public RawTransaction | startNestedReadOnlyUserTransaction(RawStoreFactory rsf, Object compatibilitySpace, ContextManager cm, String transName) | public RawTransaction | startNestedTopTransaction(RawStoreFactory rsf, ContextManager cm) | public RawTransaction | startNestedUpdateUserTransaction(RawStoreFactory rsf, ContextManager cm, String transName) | public RawTransaction | startTransaction(RawStoreFactory rsf, ContextManager cm, String transName) | public void | stop() | public boolean | submitPostCommitWork(Serviceable work) | protected void | unblockBackup() Unblock the backup, a backup blocking operation finished. | public void | unblockBackupBlockingOperations() Backup completed. | public void | useTransactionTable(Formatable transactionTable) |
INTERNAL_CONTEXT_ID | final protected static String INTERNAL_CONTEXT_ID(Code) | | |
NESTED_READONLY_USER_CONTEXT_ID | final protected static String NESTED_READONLY_USER_CONTEXT_ID(Code) | | |
NESTED_UPDATE_USER_CONTEXT_ID | final protected static String NESTED_UPDATE_USER_CONTEXT_ID(Code) | | |
NTT_CONTEXT_ID | final protected static String NTT_CONTEXT_ID(Code) | | |
USER_CONTEXT_ID | final protected static String USER_CONTEXT_ID(Code) | | |
XactFactory | public XactFactory()(Code) | | |
add | protected void add(Xact xact, boolean excludeMe)(Code) | | |
addUpdateTransaction | protected void addUpdateTransaction(TransactionId id, RawTransaction t, int transactionStatus)(Code) | | Add a transaction to the list of transactions that has updated
the raw store.
This is called underneath the BeginXact log operation's doMe method.
The logging system must guarentee that transactions are added in the
true order they are started, as defined by the order of beginXact log
record in the log.
|
blockBackup | protected boolean blockBackup(boolean wait) throws StandardException(Code) | | Block the online backup. Backup needs to be blocked while
executing any unlogged operations or any opearation that
prevents from making a consistent backup.
Parameters: wait - if true, waits until the backup is blocked. true if backup is blocked.false otherwise. exception: StandardException - if interrupted while waiting for a backup to complete. |
blockBackupBlockingOperations | public boolean blockBackupBlockingOperations(boolean wait) throws StandardException(Code) | | Checks if there are any backup blocking operations in progress and
prevents new ones from starting until the backup is finished.
If backup blocking operations are in progress and wait
parameter value is true, then it will wait for the current
backup blocking operations to finish.
A Consistent backup can not be made if there are any backup
blocking operations (like unlogged operations) are in progress
Parameters: wait - if true, waits for the current backup blocking operation in progress to finish. true if no backup blocking operations are in progressfalse otherwise. exception: StandardException - if interrupted or a runtime exception occurs |
findTransaction | public boolean findTransaction(TransactionId id, RawTransaction tran)(Code) | | Find the TransactionTableEntry with the given ID and make the passed in
transaction assume the identity and properties of that
TransactionTableEntry.
Used in recovery only.
|
firstUpdateInstant | public LogInstant firstUpdateInstant()(Code) | | Get the earliest log instant that is still active, ie, the first log
record logged by the earliest transaction that is still active.
The logging system must guarentee that the transaction table is
populated in the order transactions are started.
Used in recovery only.
|
flushLogOnCommit | public boolean flushLogOnCommit(String contextName)(Code) | | Decide if a transaction of this contextId needs to flush the log when
it commits
|
getLockFactory | public LockFactory getLockFactory()(Code) | | Get the LockFactory to use with this store.
|
getLockingPolicy | final LockingPolicy getLockingPolicy(int mode, int isolation, boolean stricterOk)(Code) | | Get a locking policy for a transaction.
|
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.
Expected to be called just after the redo and undo recovery loops,
where the transaction table should be empty except for prepared
xacts.
Used only in recovery.
exception: StandardException - Cloudscape Standard Error policy |
hasPreparedXact | public boolean hasPreparedXact()(Code) | | Check if there are any prepared transanctions in the
transaction table.
Caller must be aware that if there is no other mechanism to stop
transactions from starting and ending, then this information is
outdated as soon as it is reported.
true if there are prepared transactions in the transaction table,false otherwise. |
inDatabaseCreation | public boolean inDatabaseCreation()(Code) | | |
makeNewUUID | public UUID makeNewUUID()(Code) | | Make a new UUID for whomever that wants it
|
noActiveUpdateTransaction | public boolean noActiveUpdateTransaction()(Code) | | Returns true if there is no in flight updating tranasaction.
Caller must be aware that if there is no other mechanism to stop
transactions from starting and ending, then this information is
outdated as soon as it is reported.
Only call this function in special times - e.g, during recovery
|
prepareTransaction | protected void prepareTransaction(TransactionId id)(Code) | | Change state of transaction to prepared. Used by recovery to update
the transaction table entry to prepared state.
|
pushTransactionContext | protected void pushTransactionContext(ContextManager cm, String contextName, Xact xact, boolean abortAll, RawStoreFactory rsf, boolean excludeMe) throws StandardException(Code) | | Create a new RawTransaction, a context for it and push the context
onto the current context manager. Then add the transacion to the
transaction table.
Parameters: contextName - the name of the transaction context Parameters: xact - the Transaction object Parameters: abortAll - if true, then any error will abort the wholetransaction. Otherwise, let XactContext.cleanupOnError decide what todo Parameters: rsf - the raw store factory Parameters: excludeMe - during systeme quiesce, i.e., this transaction shouldnot be allowed to be active during a quiesce state. exception: StandardException - Standard Cloudscape error policy |
removeUpdateTransaction | protected void removeUpdateTransaction(TransactionId id)(Code) | | Remove a transaction from the list of transactions that has updated the
raw store.
|
resetTranId | public void resetTranId()(Code) | | |
rollbackAllTransactions | public void rollbackAllTransactions(RawTransaction recoveryTransaction, RawStoreFactory rsf) throws StandardException(Code) | | Rollback all active transactions that has updated the raw store.
Use the recovery Transaction that is passed in to do all the work.
Used in recovery only.
Transactions are rolled back in the following order:
- internal transactions in reversed beginXact chronological order,
- all other transactions in reversed beginXact chronological order,
Parameters: recoveryTransaction - use this transaction to do all the user transaction work exception: StandardException - any exception thrown during rollback |
submitPostCommitWork | public boolean submitPostCommitWork(Serviceable work)(Code) | | Submit this post commit work to the post commit daemon
|
unblockBackup | protected void unblockBackup()(Code) | | Unblock the backup, a backup blocking operation finished.
|
unblockBackupBlockingOperations | public void unblockBackupBlockingOperations()(Code) | | Backup completed. Allow backup blocking operations.
|
|
|