| Modifier and Type | Field and Description |
|---|---|
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int |
| Modifier and Type | Method and Description |
|---|---|
| public 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. |
| public long | addAndLoadStreamContainer(long segmentId, Properties tableProperties, RowSource rowSource)
Add a new stream container to the segment and load the stream container. |
| public long | 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.segment to create the container in. segmentId, long 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. containerId, int 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. mode, Properties Implementation-specific properties of the
conglomerate. tableProperties, int temporaryFlag)Add a new container to the segment. |
| public void | addPostAbortWork(Serviceable
the post commit work that is added work)Add to the list of post abort work that may be processed after this transaction aborts. |
| public void | addPostCommitWork(Serviceable
the post commit work that is added work)Add to the list of post commit work that may be processed after this transaction commits. |
| public void | addPostTerminationWork(Serviceable
the post termination work that is added work)Add to the list of post termination work that may be processed after this transaction commits or aborts. |
| public boolean | |
| public void | |
| public LogInstant | Returns: the commit instant of this transaction, or null if it didn't make any changesCommit this transaction. |
| public LogInstant | |
| public void | createXATransactionFromLocalTransaction(int
the format id part of the Xid - ie. Xid.getFormatId(). format_id, byte[] the global transaction identifier part of XID - ie.
Xid.getGlobalTransactionId(). global_id, byte[] The branch qualifier of the Xid - ie.
Xid.getBranchQaulifier() branch_id)Convert a local transaction to a global transaction. |
| public void | |
| public void | |
| public void | |
| public String | getActiveStateTxIdString()
get string ID of the actual transaction ID that will be used when transaction is in active state. |
| public CompatibilitySpace | Returns: The compatibility space of the transaction.Get the compatibility space of the transaction. |
| public ContextManager | |
| public DataValueFactory | |
| public LockingPolicy | Returns: The current default locking policy in this transaction.Get the current default locking policy for all operations within this transaction. |
| public FileResource | |
| public GlobalTransactionId | |
| public boolean | Returns: true If the transaction has never read or written data.Reveals whether the transaction has ever read or written data. |
| public boolean | Returns: true if so, false otherwiseReveal whether the transaction is in a pristine state, which means it hasn't done any updates since the last commit. |
| public void | |
| public LockingPolicy | Returns: A object that can be used in an openContainer call, null if a matching policy cannot be found.A constant of the form LockingPolicy.MODE_* mode, int A constant of the form LockingPolicy.ISOLATION_* isolation, boolean True if a stricter level of locking is acceptable,
false if an exact match is required. stricterOk)Obtain a locking policy for use in openContainer(). |
| public ContainerHandle | Returns: a valid ContainerHandle or null if the container does not exist.Open a container, with the transaction's default locking policy. |
| public ContainerHandle | Returns: a valid ContainerHandle or null if the container does not exist.The lock policy to use, if null then then a no locking
policy will be used. locking, int mode)Open a container, with the defined locking policy, otherwise as openContainer(int containerId, boolean forUpdate). |
| public StreamContainerHandle | Returns: a valid StreamContainerHandle or null if the container does not exist.Open a stream container. |
| public int | Returns: returns total number of savepoints in the stack.The user provided name of the savepoint, set by the user
in the setSavePoint() call. name, Object 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 kindOfSavepoint)Release the save point of the given name. |
| public int | Returns: returns total number of savepoints in the stack.The user provided name of the savepoint, set by the user
in the setSavePoint() call. name, Object 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 kindOfSavepoint)Rollback all changes made since the named savepoint was set. |
| public void | setDefaultLockingPolicy(LockingPolicy
The lock policy to use, if null then then a no locking
policy will be installed as the default. policy)Set the default locking policy for all operations within this transaction. |
| public void | setNoLockWait(boolean
if noWait)true never wait for a lock in this transaction,
but time out immediatelyTell this transaction whether it should time out immediately if a lock cannot be granted without waiting. |
| public int | Returns: returns total number of savepoints in the stack.The user provided name of the savepoint name, Object 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 kindOfSavepoint)Set a save point in the current transaction. |
| public void | setup(PersistentSet set)
Called after the transaction has been attached to an Access Manger TransactionController. |
| public void | xa_commit(boolean
If true, the resource manager should use a one-phase
commit protocol to commit the work done on behalf of
current xid. onePhase)This method is called to commit the current XA global transaction. |
| public int | 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.This method is called to ask the resource manager to prepare for a transaction commit of the transaction specified in xid. |
| public void |
| KEEP_LOCKS | back to summary |
|---|---|
| public static final int KEEP_LOCKS | |
| RELEASE_LOCKS | back to summary |
|---|---|
| public static final int RELEASE_LOCKS | |
| XA_OK | back to summary |
|---|---|
| public static final int XA_OK | |
| XA_RDONLY | back to summary |
|---|---|
| public static final int XA_RDONLY | |
| abort | back to summary |
|---|---|
| public void abort() throws StandardException 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.
| |
| addAndLoadStreamContainer | back to summary |
|---|---|
| public long addAndLoadStreamContainer(long segmentId, Properties tableProperties, RowSource rowSource) throws StandardException 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.
| |
| addContainer | back to summary |
|---|---|
| public long addContainer(long segmentId, long containerId, int mode, Properties tableProperties, int temporaryFlag) throws StandardException Add a new container to the segment. The new container initially has
one page, page Container.FIRST_PAGE_NUMBER.
Synchronisation The new container is exclusivly locked by this transaction until it commits.
| |
| addPostAbortWork | back to summary |
|---|---|
| public void addPostAbortWork(Serviceable work) Add to the list of post abort work that may be processed after this transaction aborts.
| |
| addPostCommitWork | back to summary |
|---|---|
| public void addPostCommitWork(Serviceable 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.
| |
| addPostTerminationWork | back to summary |
|---|---|
| public void addPostTerminationWork(Serviceable work) Add to the list of post termination work that may be processed after this transaction commits or aborts.
| |
| anyoneBlocked | back to summary |
|---|---|
| public boolean anyoneBlocked() Return true if any transaction is blocked, even if not by this one. | |
| close | back to summary |
|---|---|
| public void close() throws StandardException 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.
| |
| commit | back to summary |
|---|---|
| public LogInstant commit() throws StandardException Commit this transaction. All savepoints within this transaction are released.
| |
| commitNoSync | back to summary |
|---|---|
| public LogInstant commitNoSync(int commitflag) throws StandardException "Commit" this transaction without sync'ing the log.
Everything else is identical to commit(), use this at your own risk.
| |
| createXATransactionFromLocalTransaction | back to summary |
|---|---|
| public void createXATransactionFromLocalTransaction(int format_id, byte[] global_id, byte[] branch_id) throws StandardException Convert a local transaction to a global transaction. Get a transaction controller with which to manipulate data within the access manager. Tbis controller allows one to manipulate a global XA conforming 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. The (format_id, global_id, branch_id) triplet is meant to come exactly from a javax.transaction.xa.Xid. We don't use Xid so that the system can be delivered on a non-1.2 vm system and not require the javax classes in the path.
| |
| destroy | back to summary |
|---|---|
| public void destroy() throws StandardException If this transaction is not idle, abort it. After this call close().
| |
| dropContainer | back to summary |
|---|---|
| public void dropContainer(ContainerKey containerId) throws StandardException 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.
| |
| dropStreamContainer | back to summary |
|---|---|
| public void dropStreamContainer(long segmentId, long containerId) throws StandardException Drop a stream container. Synchronisation This call will remove the container.
| |
| getActiveStateTxIdString | back to summary |
|---|---|
| public String getActiveStateTxIdString() get string ID of the actual transaction ID that will be used when transaction is in active state. | |
| getCompatibilitySpace | back to summary |
|---|---|
| public 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.
| |
| getContextManager | back to summary |
|---|---|
| public ContextManager getContextManager() Return the context manager this transaction is associated with. | |
| getDataValueFactory | back to summary |
|---|---|
| public DataValueFactory getDataValueFactory() throws StandardException Get DataValueFactory. Return a DataValueFactory that can be used to allocate objects. Used to make calls to: DataValueFactory.getInstanceUsingFormatIdAndCollationType()
| |
| getDefaultLockingPolicy | back to summary |
|---|---|
| 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 to
newLockingPolicy(
LockingPolicy.MODE_RECORD, LockingPolicy.ISOLATION_SERIALIZABLE, true);
This default can be changed by subsequent calls to
setDefaultLockingPolicy(LockingPolicy policy).
| |
| getFileHandler | back to summary |
|---|---|
| public FileResource getFileHandler() Get an object to handle non-transactional files. | |
| getGlobalId | back to summary |
|---|---|
| public GlobalTransactionId getGlobalId() Return my transaction identifier. Transaction identifiers may be re-used for transactions that do not modify the raw store. May return null if this transaction has no globalId. | |
| isIdle | back to summary |
|---|---|
| public boolean isIdle() Reveals whether the transaction has ever read or written data.
| |
| isPristine | back to summary |
|---|---|
| public boolean isPristine() Reveal whether the transaction is in a pristine state, which means it hasn't done any updates since the last commit.
| |
| logAndDo | back to summary |
|---|---|
| public void logAndDo(Loggable operation) throws StandardException Log an operation and then action it in the context of this transaction. The Loggable Operation is logged in the transaction log file and then its doMe method is called to perform the required change. If this transaction aborts or a rollback is performed of the current savepoint (if any) then a compensation Operation needs to be generated that will compensate for the change of this Operation.
| |
| newLockingPolicy | back to summary |
|---|---|
| public LockingPolicy newLockingPolicy(int mode, int isolation, boolean stricterOk) 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.
| |
| openContainer | back to summary |
|---|---|
| public ContainerHandle openContainer(ContainerKey containerId, int mode) throws StandardException 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.
| |
| openContainer | back to summary |
|---|---|
| public ContainerHandle openContainer(ContainerKey containerId, LockingPolicy locking, int mode) throws StandardException 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.
| |
| openStreamContainer | back to summary |
|---|---|
| public StreamContainerHandle openStreamContainer(long segmentId, long containerId, boolean hold) throws StandardException Open a stream container.
| |
| releaseSavePoint | back to summary |
|---|---|
| public int releaseSavePoint(String name, Object kindOfSavepoint) throws StandardException 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.
| |
| rollbackToSavePoint | back to summary |
|---|---|
| public int rollbackToSavePoint(String name, Object kindOfSavepoint) throws StandardException 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).
| |
| setDefaultLockingPolicy | back to summary |
|---|---|
| public void setDefaultLockingPolicy(LockingPolicy policy) Set the default locking policy for all operations within this transaction. The transaction is intially started with a default locking policy equivalent to
newLockingPolicy(
LockingPolicy.MODE_RECORD, LockingPolicy.ISOLATION_SERIALIZABLE, true);
| |
| setNoLockWait | back to summary |
|---|---|
| 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.
| |
| setSavePoint | back to summary |
|---|---|
| public int setSavePoint(String name, Object kindOfSavepoint) throws StandardException 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".
| |
| setup | back to summary |
|---|---|
| public void setup(PersistentSet set) throws StandardException Called after the transaction has been attached to an Access Manger TransactionController. Thus may not be called for all transactions. Purpose is to allow a transaction access to database (service) properties. Will not be called for transactions early in the boot process, ie. before the property conglomerate is set up.
| |
| xa_commit | back to summary |
|---|---|
| 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.
| |
| xa_prepare | back to summary |
|---|---|
| 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.
| |
| xa_rollback | back to summary |
|---|---|
| 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.
| |