Class Xact
- java.lang.Object
-
- org.apache.derby.iapi.services.monitor.DerbyObservable
-
- org.apache.derby.iapi.store.raw.xact.RawTransaction
-
- org.apache.derby.impl.store.raw.xact.Xact
-
- All Implemented Interfaces:
Limit
,LockOwner
,Transaction
- Direct Known Subclasses:
InternalXact
public class Xact extends RawTransaction implements Limit, LockOwner
A transaction has five states- CLOSED - cannot be used
- IDLE - no reads have been performed by the transaction.
- ACTIVE - at least one read has been attempted by the transaction
- UPDATE - at least one update has been attempted by the transaction
- PREPARED - the transaction is ready to commit (FUTURE).
Transaction identifiers are re-used for transactions that do not enter the UPDATE state during their lifetime.- See Also:
Transaction
-
-
Field Summary
Fields Modifier and Type Field Description protected static int
ACTIVE
private boolean
backupBlocked
protected static int
CLOSED
private static int
COMMIT_NO_SYNC
private static int
COMMIT_PREPARE
private static int
COMMIT_SYNC
private static - make sure these bits don't overwrite bits in Transaction.commit commitflagprivate CompatibilitySpace
compatibilitySpace
protected DataFactory
dataFactory
protected DataValueFactory
dataValueFactory
private LockingPolicy
defaultLocking
private boolean
dontWaitForLocks
Tells if lock requests should time out immediately if they cannot be granted without waiting.static int
END_ABORTED
static int
END_COMMITTED
static int
END_PREPARED
private boolean
flush_log_on_xact_end
protected static int
IDLE
private java.lang.Integer
inComplete
private boolean
inPostCommitProcessing
static int
INTERNAL_TRANSACTION
private boolean
justCreated
(package private) DynamicByteArrayOutputStream
logBuffer
protected LogFactory
logFactory
protected Logger
logger
private LogInstant
logLast
private LogInstant
logStart
private GlobalTransactionId
myGlobalId
private TransactionId
myId
private boolean
needSync
static int
NESTED_TOP_TRANSACTION
private TransactionId
parentTransactionId
protected java.util.List<Serviceable>
postAbortWorks
protected java.util.List<Serviceable>
postCommitWorks
private boolean
postCompleteMode
protected java.util.List<Serviceable>
postTerminationWorks
protected static int
PREPARED
private boolean
readOnly
static int
RECOVERY_ROLLBACK_FIRST
private boolean
recoveryTransaction
private boolean
sanityCheck_xaclosed
private int
savedEndStatus
private java.util.Stack<SavePoint>
savePoints
private boolean
seenUpdates
protected int
state
private java.lang.String
transName
protected static int
UPDATE
protected XactFactory
xactFactory
protected XactContext
xc
-
Fields inherited from class org.apache.derby.iapi.store.raw.xact.RawTransaction
ABORT, COMMIT, LOCK_ESCALATE, observerException, SAVEPOINT_ROLLBACK
-
Fields inherited from interface org.apache.derby.iapi.store.raw.Transaction
KEEP_LOCKS, RELEASE_LOCKS, XA_OK, XA_RDONLY
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Xact(XactFactory xactFactory, Xact parentTransaction, LogFactory logFactory, DataFactory dataFactory, DataValueFactory dataValueFactory, boolean readOnly, CompatibilitySpace compatibilitySpace, boolean flush_log_on_xact_end)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
abort()
Abort all changes made by this transaction since the last commit, abort or the point the transaction was started, whichever is the most recent.long
addAndLoadStreamContainer(long segmentId, java.util.Properties tableProperties, RowSource rowSource)
Add a new stream container to the segment and load the stream container.long
addContainer(long segmentId, long containerid, int mode, java.util.Properties tableProperties, int temporaryFlag)
Add a new container to the segment.void
addPostAbortWork(Serviceable work)
Add to the list of post abort work that may be processed after this transaction aborts.void
addPostCommitWork(Serviceable work)
Add to the list of post commit work that may be processed after this transaction commits.void
addPostTerminationWork(Serviceable work)
Add to the list of post termination work that may be processed after this transaction commits or aborts.void
addUpdateTransaction(int transactionStatus)
Add this to the xactFactory list of update transaction.boolean
anyoneBlocked()
Return true if any transaction is currently blocked, even if not by this transaction.protected void
assumeGlobalXactIdentity(TransactionTableEntry ent)
Assume complete identity of the given Transaction Table Entry.protected void
assumeIdentity(TransactionTableEntry ent)
Transform this identity to the one stored in transaction table entry.boolean
blockBackup(boolean wait)
Make the transaction block the online backup.private void
checkObserverException()
void
checkpointInRollForwardRecovery(LogInstant cinstant, long redoLWM, long undoLWM)
Perform a checkpoint during rollforward recovery.void
close()
Close this transaction, the transaction must be idle.LogInstant
commit()
Commit this transaction.private LogInstant
commit(int commitflag)
LogInstant
commitNoSync(int commitflag)
"Commit" this transaction without sync'ing the log.private void
completeCommit(int commitflag)
Do work to complete a commit which is not just a prepare.void
createXATransactionFromLocalTransaction(int format_id, byte[] global_id, byte[] branch_id)
Convert a local transaction to a global transaction.LockingPolicy
defaultLockingPolicy()
void
destroy()
If this transaction is not idle, abort it.protected void
doComplete(java.lang.Integer commitOrAbort)
protected boolean
doPostCommitWorkInTran()
If this is a user transaction (not an internal or nested top transaction), and this is not already taking care of post commit work, and not an XA transaction, then take care of hi prioirty work right now using this thread and this context manager.void
dropContainer(ContainerKey containerId)
Drop a container.void
dropStreamContainer(long segmentId, long containerId)
Drop a stream container.java.lang.String
getActiveStateTxIdString()
Get string id of the transaction that would be when the Transaction is IN active state.CompatibilitySpace
getCompatibilitySpace()
Get the compatibility space of the transaction.java.lang.String
getContextId()
Get my transaction context IdContextManager
getContextManager()
Return the context manager this transaction is associated with.DataFactory
getDataFactory()
Get the data factory to be used during this transaction.DataValueFactory
getDataValueFactory()
Get DataValueFactory.LockingPolicy
getDefaultLockingPolicy()
Get the current default locking policy for all operations within this transaction.FileResource
getFileHandler()
Get an object to handle non-transactional files.LogInstant
getFirstLogInstant()
Get the log instant for the first log record written by this transaction.GlobalTransactionId
getGlobalId()
get the Global (external to raw store) transaction id that is unique across all raw storesTransactionId
getId()
get the short (internal to raw store) transaction id that is unique only for this raw storeprotected TransactionId
getIdNoCheck()
Get the transaction id without sanity check, this should only be called by a cloned TransactionTableEntryLogInstant
getLastLogInstant()
Get the log instant for the last log record written by this transaction.LockFactory
getLockFactory()
Get the lock factory to be used during this transaction.DynamicByteArrayOutputStream
getLogBuffer()
Get the log buffer to be used during this transaction.LogFactory
getLogFactory()
JIRA-606.private void
getLogger()
Get the Logger object used to write log records to the transaction log.private int
getSavePointPosition(java.lang.String name, java.lang.Object kindOfSavepoint, boolean forRollbackOrRelease)
Does a save point exist in the stack with the given name.(package private) java.lang.String
getState()
java.lang.String
getTransName()
boolean
handlesPostTerminationWork()
Can this transaction handles post termination workboolean
inAbort()
Is the transaction in the middle of an abort.boolean
inRollForwardRecovery()
Is the transaction in rollforward recoveryboolean
isActive()
see if this transaction has ever done anything.boolean
isBlockingBackup()
Check if the transaction is blocking the backup ?boolean
isIdle()
See if this transaction is in the idle state, called by other thread to test the state of this transaction.boolean
isNestedOwner()
Return true if this is a nested owner, e.g., a nested user transaction.boolean
isPrepared()
see if this transaction is in PREPARED state.boolean
isPristine()
see if this transaction is in a pristine state.private boolean
isUserTransaction()
see if this transaction is a user transaction.void
logAndDo(Loggable operation)
Log the operation and do it.void
logAndUndo(Compensation compensation, LogInstant undoInstant, LimitObjectInput in)
Log and apply a compensation operation.boolean
nestsUnder(LockOwner other)
Return true if this owner nests under another owner.LockingPolicy
newLockingPolicy(int mode, int isolation, boolean stricterOk)
Obtain a locking policy for use in openContainer().boolean
noWait()
Tells whether lock requests should time out immediately if they can't be granted without waiting.ContainerHandle
openContainer(ContainerKey containerId, int mode)
Open a container, with the transaction's default locking policy.ContainerHandle
openContainer(ContainerKey containerId, LockingPolicy locking, int mode)
Open a container, with the defined locking policy, otherwise as openContainer(int containerId, boolean forUpdate).RawContainerHandle
openDroppedContainer(ContainerKey containerId, LockingPolicy locking)
Open a container that may already have been dropped.StreamContainerHandle
openStreamContainer(long segmentId, long containerId, boolean hold)
Open a stream container.protected boolean
popSavePoints(int position, boolean release)
Pop all savepoints upto the one with the given name and rollback all changes made since this savepoint was pushed.protected void
postComplete(int commitflag, java.lang.Integer commitOrAbort)
private void
postTermination()
protected void
preComplete(java.lang.Integer commitOrAbort)
private LogInstant
prepareCommit(int commitflag)
Do work of commit that is common to xa_prepare and commit.void
prepareTransaction()
Remove this from the xactFactory list of update transaction.void
reached(CompatibilitySpace compatibilitySpace, java.lang.Object group, int limit, java.util.Enumeration lockList, int lockCount)
Called by the lock factory when a limit has been reached.void
recoveryTransaction()
Make this transaction aware that it is being used by recoveryvoid
reCreateContainerForRedoRecovery(long segmentId, long containerId, ByteArray containerInfo)
Recreate a container during redo recovery.private void
releaseAllLocks()
int
releaseSavePoint(java.lang.String name, java.lang.Object kindOfSavepoint)
Release the save point of the given name.void
removeUpdateTransaction()
Remove this from the xactFactory list of update transaction.void
reprepare()
During recovery re-prepare a transaction.(package private) void
resetDefaultLocking()
int
rollbackToSavePoint(java.lang.String name, java.lang.Object kindOfSavepoint)
Rollback all changes made since the named savepoint was set.protected void
setActiveState()
void
setDefaultLockingPolicy(LockingPolicy policy)
Set the default locking policy for all operations within this transaction.void
setFirstLogInstant(LogInstant instant)
Set the log instant for the first log record written by this transaction.protected void
setIdleState()
void
setLastLogInstant(LogInstant instant)
Set the log instant for the last log record written by this transaction.void
setNoLockWait(boolean noWait)
Tell this transaction whether it should time out immediately if a lock cannot be granted without waiting.(package private) void
setPostComplete()
Set the transaction to issue pre complete work at postComplete time, instead of preComplete time.protected void
setPrepareState()
Move the state of the transaction from UPDATE to PREPARE.int
setSavePoint(java.lang.String name, java.lang.Object kindOfSavepoint)
Set a save point in the current transaction.(package private) void
setTransactionId(GlobalTransactionId extid, TransactionId localid)
Set my transaction identifier.void
setTransactionId(Loggable beginXact, TransactionId localId)
Set the transactionId (Global and internal) of this transaction using a log record that contains the Global idvoid
setTransName(java.lang.String name)
void
setup(PersistentSet set)
The default value for LOCKS_ESCALATION_THRESHOLDprivate void
setUpdateState()
Move the transaction into the update state.RawTransaction
startNestedTopTransaction()
Start a nested top transaction.protected int
statusForBeginXactLog()
put this into the beginXact log record to help recovery if we needs to rolled back first, put that inprotected int
statusForEndXactLog()
put this into the endXact log record to help recovery, nothing to addprivate void
throwExceptionIfSQLSavepointNotAllowed(java.lang.Object kindOfSavepoint)
java.lang.String
toInternalDetailString()
java.lang.String
toString()
Return the xid as a string.private void
transferPostCommitorAbortWork(java.util.List<Serviceable> work_list)
private void
unblockBackup()
Unblock the backup, if it was blocked by some operation in this transaction.void
xa_commit(boolean onePhase)
This method is called to commit the current XA global transaction.int
xa_prepare()
This method is called to ask the resource manager to prepare for a transaction commit of the transaction specified in xid.void
xa_rollback()
rollback the current global transaction.-
Methods inherited from class org.apache.derby.iapi.store.raw.xact.RawTransaction
checkLogicalOperationOk, notifyObservers, recoveryRollbackFirst, setObserverException
-
Methods inherited from class org.apache.derby.iapi.services.monitor.DerbyObservable
addObserver, countObservers, deleteObserver, notifyObservers, setChanged
-
-
-
-
Field Detail
-
CLOSED
protected static final int CLOSED
- See Also:
- Constant Field Values
-
IDLE
protected static final int IDLE
- See Also:
- Constant Field Values
-
ACTIVE
protected static final int ACTIVE
- See Also:
- Constant Field Values
-
UPDATE
protected static final int UPDATE
- See Also:
- Constant Field Values
-
PREPARED
protected static final int PREPARED
- See Also:
- Constant Field Values
-
END_ABORTED
public static final int END_ABORTED
- See Also:
- Constant Field Values
-
END_PREPARED
public static final int END_PREPARED
- See Also:
- Constant Field Values
-
END_COMMITTED
public static final int END_COMMITTED
- See Also:
- Constant Field Values
-
RECOVERY_ROLLBACK_FIRST
public static final int RECOVERY_ROLLBACK_FIRST
- See Also:
- Constant Field Values
-
INTERNAL_TRANSACTION
public static final int INTERNAL_TRANSACTION
- See Also:
- Constant Field Values
-
NESTED_TOP_TRANSACTION
public static final int NESTED_TOP_TRANSACTION
- See Also:
- Constant Field Values
-
COMMIT_SYNC
private static final int COMMIT_SYNC
private static - make sure these bits don't overwrite bits in Transaction.commit commitflag- See Also:
- Constant Field Values
-
COMMIT_NO_SYNC
private static final int COMMIT_NO_SYNC
- See Also:
- Constant Field Values
-
COMMIT_PREPARE
private static final int COMMIT_PREPARE
- See Also:
- Constant Field Values
-
savedEndStatus
private int savedEndStatus
-
needSync
private boolean needSync
-
justCreated
private boolean justCreated
-
xc
protected XactContext xc
-
xactFactory
protected final XactFactory xactFactory
-
dataFactory
protected final DataFactory dataFactory
-
logFactory
protected final LogFactory logFactory
-
dataValueFactory
protected final DataValueFactory dataValueFactory
-
compatibilitySpace
private final CompatibilitySpace compatibilitySpace
-
defaultLocking
private LockingPolicy defaultLocking
-
myGlobalId
private GlobalTransactionId myGlobalId
-
myId
private volatile TransactionId myId
-
parentTransactionId
private volatile TransactionId parentTransactionId
-
logger
protected Logger logger
-
state
protected volatile int state
-
inComplete
private java.lang.Integer inComplete
-
seenUpdates
private boolean seenUpdates
-
inPostCommitProcessing
private boolean inPostCommitProcessing
-
logStart
private LogInstant logStart
-
logLast
private LogInstant logLast
-
savePoints
private java.util.Stack<SavePoint> savePoints
-
postCommitWorks
protected java.util.List<Serviceable> postCommitWorks
-
postAbortWorks
protected java.util.List<Serviceable> postAbortWorks
-
postTerminationWorks
protected java.util.List<Serviceable> postTerminationWorks
-
recoveryTransaction
private boolean recoveryTransaction
-
logBuffer
DynamicByteArrayOutputStream logBuffer
-
postCompleteMode
private boolean postCompleteMode
-
sanityCheck_xaclosed
private boolean sanityCheck_xaclosed
-
transName
private java.lang.String transName
-
readOnly
private boolean readOnly
-
flush_log_on_xact_end
private boolean flush_log_on_xact_end
-
backupBlocked
private boolean backupBlocked
-
dontWaitForLocks
private boolean dontWaitForLocks
Tells if lock requests should time out immediately if they cannot be granted without waiting.
-
-
Constructor Detail
-
Xact
protected Xact(XactFactory xactFactory, Xact parentTransaction, LogFactory logFactory, DataFactory dataFactory, DataValueFactory dataValueFactory, boolean readOnly, CompatibilitySpace compatibilitySpace, boolean flush_log_on_xact_end)
-
-
Method Detail
-
getLockFactory
public final LockFactory getLockFactory()
Description copied from class:RawTransaction
Get the lock factory to be used during this transaction.- Specified by:
getLockFactory
in classRawTransaction
-
getDataFactory
public final DataFactory getDataFactory()
Description copied from class:RawTransaction
Get the data factory to be used during this transaction.- Specified by:
getDataFactory
in classRawTransaction
-
getLogFactory
public final LogFactory getLogFactory()
JIRA-606. As a part of this fix, it was required that LogFactory.checkVersion method to be exposed for any possible Version checks in the Transaction processing module.- Specified by:
getLogFactory
in classRawTransaction
-
anyoneBlocked
public boolean anyoneBlocked()
Return true if any transaction is currently blocked, even if not by this transaction.- Specified by:
anyoneBlocked
in interfaceTransaction
-
getLogBuffer
public DynamicByteArrayOutputStream getLogBuffer()
Description copied from class:RawTransaction
Get the log buffer to be used during this transaction.- Specified by:
getLogBuffer
in classRawTransaction
-
logAndUndo
public void logAndUndo(Compensation compensation, LogInstant undoInstant, LimitObjectInput in) throws StandardException
Log and apply a compensation operation. Only need to write out the compensation op itself, the optional data has already been written by the rollforward operation this is attempting to undo.- Specified by:
logAndUndo
in classRawTransaction
- Parameters:
compensation
- the Compensation OperationundoInstant
- the LogInstant of the Loggable Operation this compensation operation is going to roll backin
- optional data for the rollback operation- Throws:
StandardException
- Standard Derby exception policy- See Also:
Transaction.logAndDo(org.apache.derby.iapi.store.raw.Loggable)
-
addUpdateTransaction
public void addUpdateTransaction(int transactionStatus)
Add this to the xactFactory list of update transaction.- Specified by:
addUpdateTransaction
in classRawTransaction
-
removeUpdateTransaction
public void removeUpdateTransaction()
Remove this from the xactFactory list of update transaction.- Specified by:
removeUpdateTransaction
in classRawTransaction
-
prepareTransaction
public void prepareTransaction()
Remove this from the xactFactory list of update transaction.- Specified by:
prepareTransaction
in classRawTransaction
-
setFirstLogInstant
public void setFirstLogInstant(LogInstant instant)
Set the log instant for the first log record written by this transaction.- Specified by:
setFirstLogInstant
in classRawTransaction
-
getFirstLogInstant
public LogInstant getFirstLogInstant()
Get the log instant for the first log record written by this transaction.- Specified by:
getFirstLogInstant
in classRawTransaction
-
setLastLogInstant
public void setLastLogInstant(LogInstant instant)
Set the log instant for the last log record written by this transaction.- Specified by:
setLastLogInstant
in classRawTransaction
-
getLastLogInstant
public LogInstant getLastLogInstant()
Get the log instant for the last log record written by this transaction.- Specified by:
getLastLogInstant
in classRawTransaction
-
setTransactionId
void setTransactionId(GlobalTransactionId extid, TransactionId localid)
Set my transaction identifier.
-
setTransactionId
public void setTransactionId(Loggable beginXact, TransactionId localId)
Description copied from class:RawTransaction
Set the transactionId (Global and internal) of this transaction using a log record that contains the Global id- Specified by:
setTransactionId
in classRawTransaction
-
setup
public void setup(PersistentSet set) throws StandardException
The default value for LOCKS_ESCALATION_THRESHOLD- Specified by:
setup
in interfaceTransaction
- Throws:
StandardException
- Standard Derby exception policy
-
getGlobalId
public final GlobalTransactionId getGlobalId()
get the Global (external to raw store) transaction id that is unique across all raw stores- Specified by:
getGlobalId
in interfaceTransaction
- Specified by:
getGlobalId
in classRawTransaction
-
getContextManager
public final ContextManager getContextManager()
Description copied from interface:Transaction
Return the context manager this transaction is associated with.- Specified by:
getContextManager
in interfaceTransaction
-
getCompatibilitySpace
public final CompatibilitySpace getCompatibilitySpace()
Get the compatibility space of the transaction.Returns an object that can be used with the lock manager to provide the compatibility space of a transaction. 2 transactions with the same compatibility space will not conflict in locks. The usual case is that each transaction has it's own unique compatibility space.
- Specified by:
getCompatibilitySpace
in interfaceTransaction
- Returns:
- The compatibility space of the transaction.
-
noWait
public boolean noWait()
Tells whether lock requests should time out immediately if they can't be granted without waiting. Only works if this object is the owner of the compatibility space used in the request.
-
setNoLockWait
public void setNoLockWait(boolean noWait)
Tell this transaction whether it should time out immediately if a lock cannot be granted without waiting. This could be used in a nested transaction to prevent long waits if there is a lock conflict between the nested transaction and its parent. If it is used this way, the calling code should catch timeout exceptions from the nested transaction and retry the operation (without disabling waiting) in the parent transaction.This only works if this transaction is the owner of the compatibility space used in the request. If this transaction has inherited the compatibility space from its parent, the call to this method has no effect (except in debug builds, where an error will be raised).
- Specified by:
setNoLockWait
in interfaceTransaction
- Parameters:
noWait
- iftrue
never wait for a lock in this transaction, but time out immediately- See Also:
LockOwner.noWait()
-
getId
public final TransactionId getId()
get the short (internal to raw store) transaction id that is unique only for this raw store- Specified by:
getId
in classRawTransaction
-
getIdNoCheck
protected final TransactionId getIdNoCheck()
Get the transaction id without sanity check, this should only be called by a cloned TransactionTableEntry
-
getContextId
public final java.lang.String getContextId()
Get my transaction context Id
-
getDefaultLockingPolicy
public LockingPolicy getDefaultLockingPolicy()
Get the current default locking policy for all operations within this transaction. The transaction is initially started with a default locking policy equivalent tonewLockingPolicy( LockingPolicy.MODE_RECORD, TransactionController.ISOLATION_SERIALIZABLE, true);
This default can be changed by subsequent calls to setDefaultLockingPolicy(LockingPolicy policy).- Specified by:
getDefaultLockingPolicy
in interfaceTransaction
- Returns:
- The current default locking policy in this transaction.
- See Also:
Transaction.getDefaultLockingPolicy()
-
newLockingPolicy
public final LockingPolicy newLockingPolicy(int mode, int isolation, boolean stricterOk)
Description copied from interface:Transaction
Obtain a locking policy for use in openContainer(). The mode and isolation must be constants from LockingPolicy. If higherOK is true then the object returned may implement a stricter form of locking than the one requested.
A null LockingPolicy reference is identical to a LockingPolicy obtained by using MODE_NONE which is guaranteed to exist.- Specified by:
newLockingPolicy
in interfaceTransaction
- Parameters:
mode
- A constant of the form LockingPolicy.MODE_*isolation
- A constant of the form LockingPolicy.ISOLATION_*stricterOk
- True if a stricter level of locking is acceptable, false if an exact match is required.- Returns:
- A object that can be used in an openContainer call, null if a matching policy cannot be found.
- See Also:
Transaction.newLockingPolicy(int, int, boolean)
-
setDefaultLockingPolicy
public final void setDefaultLockingPolicy(LockingPolicy policy)
Description copied from interface:Transaction
Set the default locking policy for all operations within this transaction. The transaction is intially started with a default locking policy equivalent tonewLockingPolicy( LockingPolicy.MODE_RECORD, LockingPolicy.ISOLATION_SERIALIZABLE, true);
- Specified by:
setDefaultLockingPolicy
in interfaceTransaction
- Parameters:
policy
- The lock policy to use, if null then then a no locking policy will be installed as the default.- See Also:
Transaction.setDefaultLockingPolicy(org.apache.derby.iapi.store.raw.LockingPolicy)
-
commit
public LogInstant commit() throws StandardException
Description copied from interface:Transaction
Commit this transaction. All savepoints within this transaction are released.- Specified by:
commit
in interfaceTransaction
- Returns:
- the commit instant of this transaction, or null if it didn't make any changes
- Throws:
StandardException
- Standard Derby exception policy
-
commitNoSync
public LogInstant commitNoSync(int commitflag) throws StandardException
Description copied from interface:Transaction
"Commit" this transaction without sync'ing the log. Everything else is identical to commit(), use this at your own risk.
bits in the commitflag can turn on to fine tuned the "commit": KEEP_LOCKS - no locks will be released by the commit and no post commit processing will be initiated. If, for some reasons, the locks cannot be kept even if this flag is set, then the commit will sync the log, i.e., it will revert to the normal commit.- Specified by:
commitNoSync
in interfaceTransaction
- Throws:
StandardException
- Standard Derby exception policy
-
prepareCommit
private LogInstant prepareCommit(int commitflag) throws StandardException
Do work of commit that is common to xa_prepare and commit.Do all the work necessary as part of a commit up to and including writing the commit log record. This routine is used by both prepare and commit. The work post commit is done by completeCommit().
- Parameters:
commitflag
- various flavors of commit.- Throws:
StandardException
- Standard exception policy.- See Also:
Transaction.commit()
-
completeCommit
private void completeCommit(int commitflag) throws StandardException
Do work to complete a commit which is not just a prepare.Releases locks, does post commit work, and moves the state of the transaction to IDLE.
- Parameters:
commitflag
- various flavors of commit.- Throws:
StandardException
- Standard exception policy.
-
commit
private LogInstant commit(int commitflag) throws StandardException
- Throws:
StandardException
- Standard Derby exception policy- See Also:
Transaction.commit()
-
abort
public void abort() throws StandardException
Description copied from interface:Transaction
Abort all changes made by this transaction since the last commit, abort or the point the transaction was started, whichever is the most recent. All savepoints within this transaction are released.- Specified by:
abort
in interfaceTransaction
- Throws:
StandardException
- Standard Derby exception policy- See Also:
Transaction.abort()
-
reprepare
public void reprepare() throws StandardException
During recovery re-prepare a transaction.After redo() and undo(), this routine is called on all outstanding in-doubt (prepared) transactions. This routine re-acquires all logical write locks for operations in the xact, and then modifies the transaction table entry to make the transaction look as if it had just been prepared following startup after recovery.
This routine is only called during Recovery.
- Specified by:
reprepare
in classRawTransaction
- Throws:
StandardException
- Standard exception policy.
-
destroy
public void destroy() throws StandardException
If this transaction is not idle, abort it. After this call close().- Specified by:
destroy
in interfaceTransaction
- Throws:
StandardException
- Standard Derby error policy Thrown if the transaction is not idle.- See Also:
RawStoreFactory.startTransaction(org.apache.derby.iapi.services.context.ContextManager, java.lang.String)
-
close
public void close() throws StandardException
Description copied from interface:Transaction
Close this transaction, the transaction must be idle. This close will pop the transaction context off the stack that was pushed when the transaction was started.- Specified by:
close
in interfaceTransaction
- Throws:
StandardException
- Thrown if the transaction is not idle, the transaction remains open.- See Also:
Transaction.close()
-
logAndDo
public void logAndDo(Loggable operation) throws StandardException
Log the operation and do it. If this transaction has not generated any log records prior to this, then log a beginXact log record. If the passed in operation is null, then do nothing (after logging the beginXact if needed).- Specified by:
logAndDo
in interfaceTransaction
- Parameters:
operation
- the operation that is to be applied- Throws:
StandardException
- Standard Derby exception policy- See Also:
Transaction.logAndDo(org.apache.derby.iapi.store.raw.Loggable)
-
addPostCommitWork
public void addPostCommitWork(Serviceable work)
Description copied from interface:Transaction
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.- Specified by:
addPostCommitWork
in interfaceTransaction
- Parameters:
work
- the post commit work that is added
-
addPostAbortWork
public void addPostAbortWork(Serviceable work)
Add to the list of post abort work that may be processed after this transaction aborts.- Specified by:
addPostAbortWork
in interfaceTransaction
- Parameters:
work
- the post commit work that is added
-
addPostTerminationWork
public void addPostTerminationWork(Serviceable work)
Description copied from interface:Transaction
Add to the list of post termination work that may be processed after this transaction commits or aborts.- Specified by:
addPostTerminationWork
in interfaceTransaction
- Parameters:
work
- the post termination work that is added
-
openContainer
public ContainerHandle openContainer(ContainerKey containerId, int mode) throws StandardException
Description copied from interface:Transaction
Open a container, with the transaction's default locking policy.Note that if NOWAIT has been specified lock will be requested with no wait time, and if lock is not granted a SQLState.LOCK_TIMEOUT exception will be thrown.
The release() method of ContainerHandle will be called when this transaction is aborted or commited, it may be called explicitly to release the ContainerHandle before the end of the transaction.
- Specified by:
openContainer
in interfaceTransaction
- Returns:
- a valid ContainerHandle or null if the container does not exist.
- Throws:
StandardException
- Standard Derby exception policy- See Also:
Transaction.openContainer(org.apache.derby.iapi.store.raw.ContainerKey, int)
-
openContainer
public ContainerHandle openContainer(ContainerKey containerId, LockingPolicy locking, int mode) throws StandardException
Description copied from interface:Transaction
Open a container, with the defined locking policy, otherwise as openContainer(int containerId, boolean forUpdate).Calls locking.lockContainer(this, returnValue, forUpdate) to lock the container. Note that if NOWAIT has been specified lock will be requested with no wait time, and if lock is not granted a SQLState.LOCK_TIMEOUT exception will be thrown.
- Specified by:
openContainer
in interfaceTransaction
locking
- The lock policy to use, if null then then a no locking policy will be used.- Returns:
- a valid ContainerHandle or null if the container does not exist.
- Throws:
StandardException
- Standard Derby exception policy- See Also:
Transaction.openContainer(org.apache.derby.iapi.store.raw.ContainerKey, int)
-
openDroppedContainer
public RawContainerHandle openDroppedContainer(ContainerKey containerId, LockingPolicy locking) throws StandardException
Open a container that may already have been dropped.- Specified by:
openDroppedContainer
in classRawTransaction
- Throws:
StandardException
- Standard Derby exception policy- See Also:
RawTransaction.openDroppedContainer(org.apache.derby.iapi.store.raw.ContainerKey, org.apache.derby.iapi.store.raw.LockingPolicy)
-
addContainer
public long addContainer(long segmentId, long containerid, int mode, java.util.Properties tableProperties, int temporaryFlag) throws StandardException
Description copied from interface:Transaction
Add a new container to the segment. The new container initially has one page, page Container.FIRST_PAGE_NUMBER.
If pageSize is equal to ContainerHandle.DEFAULT_PAGESIZE or invalid then a default page size will be picked.
SpareSpace indicates that percent (0% - 100%) of page space that will be attempted to be reserved for updates. E.g. with a value of 20 a page that would normally hold 40 rows will be limited to 32 rows, actual calculation for the threshold where no more inserts are all accepted is up to the implementation. Whatever the value of spaceSpace an empty page will always accept at least one insert. If spare space is equal to ContainerHandle.DEFAULT_PAGESIZE or invalid then a default value will be used.Synchronisation
The new container is exclusivly locked by this transaction until it commits.
- Specified by:
addContainer
in interfaceTransaction
- Parameters:
segmentId
- segment to create the container in.containerid
- If not equal to 0 then this container id will be used to create the container, else if set to 0 then the raw store will assign a number.mode
- mode description in @see ContainerHandle. This mode is only effective for the duration of the addContainer call and not stored persistently for the lifetime of the container.tableProperties
- Implementation-specific properties of the conglomerate.- Returns:
- a container identifer that can be used in openContainer() This id is only valid within this RawStoreFactory. Returns a negative number if a container could not be allocated.
- Throws:
StandardException
- Standard Derby exception policy- See Also:
Transaction.addContainer(long, long, int, java.util.Properties, int)
-
addAndLoadStreamContainer
public long addAndLoadStreamContainer(long segmentId, java.util.Properties tableProperties, RowSource rowSource) throws StandardException
Description copied from interface:Transaction
Add a new stream container to the segment and load the stream container. This stream container doesn't not have locks, and do not log. It does not have the concept of a page. It is used by the external sort only.Synchronisation
This call will mark the container as dropped and then obtain an CX lock on the container. Once a container has been marked as dropped it cannot be retrieved by any openContainer() call.
Once the exclusive lock has been obtained the container is removed and all its pages deallocated. The container will be fully removed at the commit time of the transaction.
- Specified by:
addAndLoadStreamContainer
in interfaceTransaction
- Throws:
StandardException
- Standard Derby exception policy- See Also:
Transaction.addAndLoadStreamContainer(long, java.util.Properties, org.apache.derby.iapi.store.access.RowSource)
-
openStreamContainer
public StreamContainerHandle openStreamContainer(long segmentId, long containerId, boolean hold) throws StandardException
Description copied from interface:Transaction
Open a stream container.- Specified by:
openStreamContainer
in interfaceTransaction
- Returns:
- a valid StreamContainerHandle or null if the container does not exist.
- Throws:
StandardException
- Standard Derby exception policy- See Also:
Transaction.openStreamContainer(long, long, boolean)
-
dropStreamContainer
public void dropStreamContainer(long segmentId, long containerId) throws StandardException
Description copied from interface:Transaction
Drop a stream container.Synchronisation
This call will remove the container.
- Specified by:
dropStreamContainer
in interfaceTransaction
- Throws:
StandardException
- Standard Derby error policy- See Also:
Transaction.dropStreamContainer(long, long)
-
reCreateContainerForRedoRecovery
public void reCreateContainerForRedoRecovery(long segmentId, long containerId, ByteArray containerInfo) throws StandardException
Recreate a container during redo recovery. Used only during redo recovery while processing log records which are trying to create a container, and no valid container is found in the database.- Specified by:
reCreateContainerForRedoRecovery
in classRawTransaction
- Throws:
StandardException
- Standard Derby exception policy- See Also:
RawTransaction.reCreateContainerForRedoRecovery(long, long, org.apache.derby.iapi.util.ByteArray)
-
dropContainer
public void dropContainer(ContainerKey containerId) throws StandardException
Description copied from interface:Transaction
Drop a container.Synchronisation
This call will mark the container as dropped and then obtain an CX lock on the container. Once a container has been marked as dropped it cannot be retrieved by any openContainer() call.
Once the exclusive lock has been obtained the container is removed and all its pages deallocated. The container will be fully removed at the commit time of the transaction.
- Specified by:
dropContainer
in interfaceTransaction
- Throws:
StandardException
- Standard Derby error policy- See Also:
Transaction.dropContainer(org.apache.derby.iapi.store.raw.ContainerKey)
-
setSavePoint
public int setSavePoint(java.lang.String name, java.lang.Object kindOfSavepoint) throws StandardException
Description copied from interface:Transaction
Set a save point in the current transaction. A save point defines a point in time in the transaction that changes can be rolled back to. Savepoints can be nested and they behave like a stack. Setting save points "one" and "two" and the rolling back "one" will rollback all the changes made since "one" (including those made since "two") and release savepoint "two".- Specified by:
setSavePoint
in interfaceTransaction
- Parameters:
name
- The user provided name of the savepointkindOfSavepoint
- A NULL value means it is an internal savepoint (ie not a user defined savepoint) Non NULL value means it is a user defined savepoint which can be a SQL savepoint or a JDBC savepoint A String value for kindOfSavepoint would mean it is SQL savepoint A JDBC Savepoint object value for kindOfSavepoint would mean it is JDBC savepoint- Returns:
- returns total number of savepoints in the stack.
- Throws:
StandardException
- Standard Derby exception policy- See Also:
Transaction.setSavePoint(java.lang.String, java.lang.Object)
-
throwExceptionIfSQLSavepointNotAllowed
private void throwExceptionIfSQLSavepointNotAllowed(java.lang.Object kindOfSavepoint) throws StandardException
- Throws:
StandardException
- Standard Derby exception policy- See Also:
Transaction.setSavePoint(java.lang.String, java.lang.Object)
-
releaseSavePoint
public int releaseSavePoint(java.lang.String name, java.lang.Object kindOfSavepoint) throws StandardException
Description copied from interface:Transaction
Release the save point of the given name. Relasing a savepoint removes all knowledge from this transaction of the named savepoint and any savepoints set since the named savepoint was set.- Specified by:
releaseSavePoint
in interfaceTransaction
- Parameters:
name
- The user provided name of the savepoint, set by the user in the setSavePoint() call.kindOfSavepoint
- A NULL value means it is an internal savepoint (ie not a user defined savepoint) Non NULL value means it is a user defined savepoint which can be a SQL savepoint or a JDBC savepoint A String value for kindOfSavepoint would mean it is SQL savepoint A JDBC Savepoint object value for kindOfSavepoint would mean it is JDBC savepoint- Returns:
- returns total number of savepoints in the stack.
- Throws:
StandardException
- Standard Derby exception policy- See Also:
Transaction.releaseSavePoint(java.lang.String, java.lang.Object)
-
rollbackToSavePoint
public int rollbackToSavePoint(java.lang.String name, java.lang.Object kindOfSavepoint) throws StandardException
Description copied from interface:Transaction
Rollback all changes made since the named savepoint was set. The named savepoint is not released, it remains valid within this transaction, and thus can be named it future rollbackToSavePoint() calls. Any savepoints set since this named savepoint are released (and their changes rolled back).- Specified by:
rollbackToSavePoint
in interfaceTransaction
- Parameters:
name
- The user provided name of the savepoint, set by the user in the setSavePoint() call.kindOfSavepoint
- A NULL value means it is an internal savepoint (ie not a user defined savepoint) Non NULL value means it is a user defined savepoint which can be a SQL savepoint or a JDBC savepoint A String value for kindOfSavepoint would mean it is SQL savepoint A JDBC Savepoint object value for kindOfSavepoint would mean it is JDBC savepoint- Returns:
- returns total number of savepoints in the stack.
- Throws:
StandardException
- Standard Derby exception policy- See Also:
Transaction.rollbackToSavePoint(java.lang.String, java.lang.Object)
-
getLogger
private void getLogger()
Get the Logger object used to write log records to the transaction log.
-
assumeIdentity
protected void assumeIdentity(TransactionTableEntry ent)
Transform this identity to the one stored in transaction table entry. Used by recovery only!
-
assumeGlobalXactIdentity
protected void assumeGlobalXactIdentity(TransactionTableEntry ent)
Assume complete identity of the given Transaction Table Entry.Used by the final phase of the recovery to create new real transactions to take on the identity of in-doubt prepared transactions found during redo. Need to assume the globalId.
- Parameters:
ent
- The original entry we are assuming the identity of.
-
setUpdateState
private final void setUpdateState() throws StandardException
Move the transaction into the update state.- Throws:
StandardException
- problem setting a transaction id
-
setIdleState
protected void setIdleState()
-
setActiveState
protected final void setActiveState() throws StandardException
- Throws:
StandardException
-
setPrepareState
protected final void setPrepareState() throws StandardException
Move the state of the transaction from UPDATE to PREPARE.The state transition should only be from UPDATE to PREPARE. Read-only transactions (IDLE and ACTIVE) will never be prepared, they will be commited when the prepare is requested. Only Update transactions will be allowed to go to prepared state.
- Throws:
StandardException
- Standard exception policy.
-
defaultLockingPolicy
public final LockingPolicy defaultLockingPolicy()
-
releaseAllLocks
private final void releaseAllLocks()
-
resetDefaultLocking
void resetDefaultLocking()
-
preComplete
protected void preComplete(java.lang.Integer commitOrAbort) throws StandardException
- Throws:
StandardException
-
postComplete
protected void postComplete(int commitflag, java.lang.Integer commitOrAbort) throws StandardException
- Throws:
StandardException
-
doComplete
protected void doComplete(java.lang.Integer commitOrAbort) throws StandardException
- Throws:
StandardException
-
checkObserverException
private void checkObserverException() throws StandardException
- Throws:
StandardException
-
doPostCommitWorkInTran
protected boolean doPostCommitWorkInTran()
If this is a user transaction (not an internal or nested top transaction), and this is not already taking care of post commit work, and not an XA transaction, then take care of hi prioirty work right now using this thread and this context manager. Otherwise, leave it to the post commit daemon.
-
handlesPostTerminationWork
public boolean handlesPostTerminationWork()
Description copied from class:RawTransaction
Can this transaction handles post termination work- Specified by:
handlesPostTerminationWork
in classRawTransaction
-
recoveryTransaction
public void recoveryTransaction()
Description copied from class:RawTransaction
Make this transaction aware that it is being used by recovery- Specified by:
recoveryTransaction
in classRawTransaction
-
transferPostCommitorAbortWork
private void transferPostCommitorAbortWork(java.util.List<Serviceable> work_list) throws StandardException
- Throws:
StandardException
-
postTermination
private final void postTermination() throws StandardException
- Throws:
StandardException
-
getSavePointPosition
private int getSavePointPosition(java.lang.String name, java.lang.Object kindOfSavepoint, boolean forRollbackOrRelease)
Does a save point exist in the stack with the given name. Returns the position of the savepoint in the array
-
popSavePoints
protected boolean popSavePoints(int position, boolean release) throws StandardException
Pop all savepoints upto the one with the given name and rollback all changes made since this savepoint was pushed. If release is true then this savepoint is popped as well, otherwise it is left in the stack (at the top).- Returns:
- true if any work is rolled back, false if no work is rolled back
- Throws:
StandardException
- Thrown if a error of severity less than TransactionException#SEVERITY is encountered during the rollback of this savepoint.
-
startNestedTopTransaction
public RawTransaction startNestedTopTransaction() throws StandardException
Description copied from class:RawTransaction
Start a nested top transaction. A nested top transaction behaves exactly like a user transaction. Nested top transaction allow system type work to proceed in a separate transaction to the current user transaction and be committed independently of the user transaction (usually before the user transaction). Only one nested top transaction can be active in a context at any one time. After a commit the transaction may be re-used. A nested top transaction conflicts on the logical locks of its "parent" transaction.- Specified by:
startNestedTopTransaction
in classRawTransaction
- Throws:
StandardException
- Derby Standard error policy
-
isUserTransaction
private boolean isUserTransaction()
see if this transaction is a user transaction.- Returns:
- true if this transaction is a user transaction
-
isActive
public final boolean isActive()
see if this transaction has ever done anything. MT - single thread through synchronizing this. This method may be called by other thread to test the state of this transaction. That's why we need to synchronize with all methods which enters or exits the Idle state. Local method which read the state need not be synchronized because the other thread may look at the state but it may not change it.- Returns:
- true if this transaction is not in idle or closed state
-
isPrepared
public final boolean isPrepared()
see if this transaction is in PREPARED state. MT - single thread through synchronizing this. This method may be called by other thread to test the state of this transaction.- Returns:
- true if this transaction is in PREPARED state.
-
isIdle
public boolean isIdle()
See if this transaction is in the idle state, called by other thread to test the state of this transaction. That's why we need to synchronzied with all methods whcih enters or exits the idle state- Specified by:
isIdle
in interfaceTransaction
- Returns:
- true if it is idle, otherwise false
-
isPristine
public boolean isPristine()
see if this transaction is in a pristine state.
MT - called only by the same thread that owns the xact, no need to synchronize.- Specified by:
isPristine
in interfaceTransaction
- Returns:
- true if it hasn't done any updates, otherwise false
-
inAbort
public boolean inAbort()
Description copied from class:RawTransaction
Is the transaction in the middle of an abort.- Specified by:
inAbort
in classRawTransaction
-
getFileHandler
public FileResource getFileHandler()
Description copied from interface:Transaction
Get an object to handle non-transactional files.- Specified by:
getFileHandler
in interfaceTransaction
-
statusForBeginXactLog
protected int statusForBeginXactLog()
put this into the beginXact log record to help recovery if we needs to rolled back first, put that in- Specified by:
statusForBeginXactLog
in classRawTransaction
-
statusForEndXactLog
protected int statusForEndXactLog()
put this into the endXact log record to help recovery, nothing to add- Specified by:
statusForEndXactLog
in classRawTransaction
-
setPostComplete
void setPostComplete()
Set the transaction to issue pre complete work at postComplete time, instead of preComplete time. This means that latches and containers will be held open until after a commit or an abort.
-
blockBackup
public boolean blockBackup(boolean wait) throws StandardException
Make the transaction block the online backup.- Specified by:
blockBackup
in classRawTransaction
- Parameters:
wait
- if true, waits until the transaction can block the backup.- Returns:
- true if the transaction blocked the backup. false otherwise.
- Throws:
StandardException
- if interrupted while waiting for the backup in progress to complete.
-
unblockBackup
private void unblockBackup()
Unblock the backup, if it was blocked by some operation in this transaction. Unblocking is done at commit/abort of this transaction.
-
isBlockingBackup
public boolean isBlockingBackup()
Check if the transaction is blocking the backup ?- Specified by:
isBlockingBackup
in classRawTransaction
- Returns:
- true if this transaction is blocking the backup, otherwise false
-
reached
public void reached(CompatibilitySpace compatibilitySpace, java.lang.Object group, int limit, java.util.Enumeration lockList, int lockCount) throws StandardException
Description copied from interface:Limit
Called by the lock factory when a limit has been reached.- Specified by:
reached
in interfaceLimit
- Parameters:
compatibilitySpace
- lock space the limit was set forgroup
- lock group the limit was set forlimit
- the limit's settinglockList
- the list of Lockable's in the grouplockCount
- the number of locks in the group- Throws:
StandardException
- Standard Derby error policy.
-
createXATransactionFromLocalTransaction
public void createXATransactionFromLocalTransaction(int format_id, byte[] global_id, byte[] branch_id) throws StandardException
Convert a local transaction to a global transaction.Must only be called a previous local transaction was created and exists in the context. Can only be called if the current transaction is in the idle state, and no current global id.
Simply call setTransactionId() which takes care of error checking.
- Specified by:
createXATransactionFromLocalTransaction
in interfaceTransaction
- Parameters:
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()- Throws:
StandardException
- Standard exception policy.
-
xa_commit
public void xa_commit(boolean onePhase) throws StandardException
This method is called to commit the current XA global transaction.RESOLVE - how do we map to the "right" XAExceptions.
- Specified by:
xa_commit
in interfaceTransaction
- Parameters:
onePhase
- If true, the resource manager should use a one-phase commit protocol to commit the work done on behalf of current xid.- Throws:
StandardException
- Standard exception policy.
-
xa_prepare
public int xa_prepare() throws StandardException
This method is called to ask the resource manager to prepare for a transaction commit of the transaction specified in xid.- Specified by:
xa_prepare
in interfaceTransaction
- Returns:
- A value indicating the resource manager's vote on the the outcome of the transaction. The possible values are: XA_RDONLY or XA_OK. If the resource manager wants to roll back the transaction, it should do so by throwing an appropriate XAException in the prepare method.
- Throws:
StandardException
- Standard exception policy.
-
xa_rollback
public void xa_rollback() throws StandardException
rollback the current global transaction.The given transaction is roll'ed back and it's history is not maintained in the transaction table or long term log.
- Specified by:
xa_rollback
in interfaceTransaction
- Throws:
StandardException
- Standard exception policy.
-
toString
public java.lang.String toString()
Return the xid as a string.The virtual lock table depends on this routine returning just the local transaction id as a string, even if it is a global transaction. Joins between the lock table and the transaction table will not work if this routine returns anything other than myId.toString().
- Overrides:
toString
in classjava.lang.Object
- Returns:
- The xid as a string.
-
toInternalDetailString
public java.lang.String toInternalDetailString()
-
getActiveStateTxIdString
public java.lang.String getActiveStateTxIdString()
Get string id of the transaction that would be when the Transaction is IN active state. This transaction "name" will be the same id which is returned in the TransactionInfo information if Tx is already in Active State. If the Transaction is in IDLE state, Transaction ID is incremented when getActiveStateTxIdString() on raw transaction is called, instead of the Tx ID being incremented when Transaction gets into active state. The reason for incrementing the Tx ID earlier than when Tx is actually goes into active state is some debug statement cases like log statement text. SQL statements are written to log before they are actually executed; In such cases we would like to display the actual TX ID on which locks are acquired when the statement is executed.- Specified by:
getActiveStateTxIdString
in interfaceTransaction
- Returns:
- The a string which identifies the transaction.
-
getDataValueFactory
public DataValueFactory getDataValueFactory() throws StandardException
Get DataValueFactory.Return a DataValueFactory that can be used to allocate objects. Used to make calls to: DataValueFactory.getInstanceUsingFormatIdAndCollationType()
- Specified by:
getDataValueFactory
in interfaceTransaction
- Returns:
- a booted data value factory.
- Throws:
StandardException
- Standard exception policy.
-
getState
java.lang.String getState()
-
getTransName
public java.lang.String getTransName()
-
setTransName
public void setTransName(java.lang.String name)
-
inRollForwardRecovery
public boolean inRollForwardRecovery()
Is the transaction in rollforward recovery- Specified by:
inRollForwardRecovery
in classRawTransaction
-
checkpointInRollForwardRecovery
public void checkpointInRollForwardRecovery(LogInstant cinstant, long redoLWM, long undoLWM) throws StandardException
Perform a checkpoint during rollforward recovery.- Specified by:
checkpointInRollForwardRecovery
in classRawTransaction
- Parameters:
cinstant
- The LogInstant of the checkpointredoLWM
- Redo Low Water Mark in the check point recordundoLWM
- Undo Low Water Mark in the checkpoint- Throws:
StandardException
-
isNestedOwner
public boolean isNestedOwner()
Description copied from interface:LockOwner
Return true if this is a nested owner, e.g., a nested user transaction.
- Specified by:
isNestedOwner
in interfaceLockOwner
-
nestsUnder
public boolean nestsUnder(LockOwner other)
Description copied from interface:LockOwner
Return true if this owner nests under another owner.
- Specified by:
nestsUnder
in interfaceLockOwner
-
-