Additional top-level class in compilation unit: LockCount.
Transaction
| Modifier and Type | Field and Description |
|---|---|
| protected static final int | |
| private boolean | |
| protected static final int | |
| private static final int | |
| private static final int | |
| private static final int | COMMIT_SYNC
private static - make sure these bits don't overwrite bits in Transaction.commit commitflag |
| private final CompatibilitySpace | |
| protected final DataFactory | |
| protected final DataValueFactory | |
| private LockingPolicy | |
| private boolean | dontWaitForLocks
Tells if lock requests should time out immediately if they cannot be granted without waiting. |
| public static final int | |
| public static final int | |
| public static final int | |
| private boolean | |
| protected static final int | |
| private Integer | |
| private boolean | |
| public static final int | |
| private boolean | |
| pack-priv DynamicByteArrayOutputStream | |
| protected final LogFactory | |
| protected Logger | |
| private LogInstant | |
| private LogInstant | |
| private GlobalTransactionId | |
| private volatile TransactionId | |
| private boolean | |
| public static final int | |
| private volatile TransactionId | |
| protected List | |
| protected List | |
| private boolean | |
| protected List | |
| protected static final int | |
| private boolean | |
| public static final int | |
| private boolean | |
| private boolean | |
| private int | |
| private Stack | |
| private boolean | |
| protected volatile int | |
| private String | |
| protected static final int | |
| protected final XactFactory | |
| protected XactContext |
| Access | Constructor and Description |
|---|---|
| protected | Xact(XactFactory xactFactory, Xact parentTransaction, LogFactory logFactory, DataFactory dataFactory, DataValueFactory dataValueFactory, boolean readOnly, CompatibilitySpace compatibilitySpace, boolean flush_log_on_xact_end)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | abort()
Implements org. 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)
Implements org. Add a new stream container to the segment and load the stream container. |
| public long | addContainer(long
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)Implements org. Add a new container to the segment. |
| public void | addPostAbortWork(Serviceable
the post commit work that is added work)Implements org. 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)Implements org. 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)Implements org. Add to the list of post termination work that may be processed after this transaction commits or aborts. |
| public void | addUpdateTransaction(int transactionStatus)
Implements abstract org. Add this to the xactFactory list of update transaction. |
| public boolean | anyoneBlocked()
Implements org. Return true if any transaction is currently blocked, even if not by this transaction. |
| protected void | assumeGlobalXactIdentity(TransactionTableEntry
The original entry we are assuming the identity of. 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. |
| public boolean | Returns: true if the transaction blocked the backup. false otherwise.if true, waits until the transaction
can block the backup. wait)Implements abstract org. Make the transaction block the online backup. |
| private void | |
| public void | checkpointInRollForwardRecovery(LogInstant
The LogInstant of the checkpoint cinstant, long Redo Low Water Mark in the check point record redoLWM, long Undo Low Water Mark in the checkpoint undoLWM)Implements abstract org. Perform a checkpoint during rollforward recovery. |
| public void | close()
Implements org. Close this transaction, the transaction must be idle. |
| public LogInstant | |
| private LogInstant | |
| public LogInstant | commitNoSync(int commitflag)
Implements org. "Commit" this transaction without sync'ing the log. |
| private void | completeCommit(int
various flavors of commit. commitflag)Do work to complete a commit which is not just a prepare. |
| 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)Implements org. Convert a local transaction to a global transaction. |
| public final LockingPolicy | |
| public void | destroy()
Implements org. If this transaction is not idle, abort it. |
| protected void | |
| 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. |
| public void | dropContainer(ContainerKey containerId)
Implements org. Drop a container. |
| public void | dropStreamContainer(long segmentId, long containerId)
Implements org. Drop a stream container. |
| public String | Returns: The a string which identifies the transaction.Implements org. Get string id of the transaction that would be when the Transaction is IN active state. |
| public final CompatibilitySpace | Returns: The compatibility space of the transaction.Implements org. Get the compatibility space of the transaction. |
| public final String | |
| public final ContextManager | getContextManager()
Implements org. Return the context manager this transaction is associated with. |
| public final DataFactory | getDataFactory()
Implements abstract org. Get the data factory to be used during this transaction. |
| public DataValueFactory | Returns: a booted data value factory.Implements org. Get DataValueFactory. |
| public LockingPolicy | Returns: The current default locking policy in this transaction.Implements org. Get the current default locking policy for all operations within this transaction. |
| public FileResource | getFileHandler()
Implements org. Get an object to handle non-transactional files. |
| public LogInstant | getFirstLogInstant()
Implements abstract org. Get the log instant for the first log record written by this transaction. |
| public final GlobalTransactionId | getGlobalId()
Implements abstract org. Implements org. get the Global (external to raw store) transaction id that is unique across all raw stores |
| public final TransactionId | getId()
Implements abstract org. get the short (internal to raw store) transaction id that is unique only for this raw store |
| protected final TransactionId | getIdNoCheck()
Get the transaction id without sanity check, this should only be called by a cloned TransactionTableEntry |
| public LogInstant | getLastLogInstant()
Implements abstract org. Get the log instant for the last log record written by this transaction. |
| public final LockFactory | getLockFactory()
Implements abstract org. Get the lock factory to be used during this transaction. |
| public DynamicByteArrayOutputStream | getLogBuffer()
Implements abstract org. Get the log buffer to be used during this transaction. |
| public final LogFactory | getLogFactory()
Implements abstract org. JIRA-606. |
| private void | |
| private int | getSavePointPosition(String name, Object kindOfSavepoint, boolean forRollbackOrRelease)
Does a save point exist in the stack with the given name. |
| pack-priv String | |
| public String | |
| public boolean | handlesPostTerminationWork()
Implements abstract org. Can this transaction handles post termination work |
| public boolean | inAbort()
Implements abstract org. Is the transaction in the middle of an abort. |
| public boolean | inRollForwardRecovery()
Implements abstract org. Is the transaction in rollforward recovery |
| public final boolean | Returns: true if this transaction is not in idle or closed statesee if this transaction has ever done anything. |
| public boolean | Returns: true if this transaction is blocking the backup, otherwise falseImplements abstract org. Check if the transaction is blocking the backup ? |
| public boolean | Returns: true if it is idle, otherwise falseImplements org. See if this transaction is in the idle state, called by other thread to test the state of this transaction. |
| public boolean | isNestedOwner()
Implements org. Return true if this is a nested owner, e.g., a nested user transaction. |
| public final boolean | Returns: true if this transaction is in PREPARED state.see if this transaction is in PREPARED state. |
| public boolean | Returns: true if it hasn't done any updates, otherwise falseImplements org. see if this transaction is in a pristine state. |
| private boolean | Returns: true if this transaction is a user transactionsee if this transaction is a user transaction. |
| public void | logAndDo(Loggable
the operation that is to be applied operation)Implements org. Log the operation and do it. |
| public void | logAndUndo(Compensation
the Compensation Operation compensation, LogInstant the LogInstant of the Loggable Operation this
compensation operation is going to roll back undoInstant, LimitObjectInput optional data for the rollback operation in)Implements abstract org. Log and apply a compensation operation. |
| public boolean | nestsUnder(LockOwner
The other lock owner other)Implements org. Return true if this owner nests under another owner. |
| public final LockingPolicy | newLockingPolicy(int
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)Implements org. Obtain a locking policy for use in openContainer(). |
| public boolean | Returns: whether waiting for locks should time out immediatelyImplements org. Tells whether lock requests should time out immediately if they can't be granted without waiting. |
| public ContainerHandle | openContainer(ContainerKey containerId, int mode)
Implements org. Open a container, with the transaction's default locking policy. |
| public ContainerHandle | openContainer(ContainerKey containerId, LockingPolicy
The lock policy to use, if null then then a no locking
policy will be used. locking, int mode)Implements org. Open a container, with the defined locking policy, otherwise as openContainer(int containerId, boolean forUpdate). |
| public RawContainerHandle | openDroppedContainer(ContainerKey containerId, LockingPolicy locking)
Implements abstract org. Open a container that may already have been dropped. |
| public StreamContainerHandle | openStreamContainer(long segmentId, long containerId, boolean hold)
Implements org. Open a stream container. |
| protected boolean | Returns: true if any work is rolled back, false if no work is rolled backPop all savepoints upto the one with the given name and rollback all changes made since this savepoint was pushed. |
| protected void | |
| private final void | |
| protected void | |
| private LogInstant | prepareCommit(int
various flavors of commit. commitflag)Do work of commit that is common to xa_prepare and commit. |
| public void | prepareTransaction()
Implements abstract org. Remove this from the xactFactory list of update transaction. |
| public void | reached(CompatibilitySpace
lock space the limit was set for compatibilitySpace, Object lock group the limit was set for group, int the limit's setting limit, Enumeration<E> the list of Lockable's in the group lockList, int the number of locks in the group lockCount)Implements org. Called by the lock factory when a limit has been reached. |
| public void | recoveryTransaction()
Implements abstract org. Make this transaction aware that it is being used by recovery |
| public void | reCreateContainerForRedoRecovery(long segmentId, long containerId, ByteArray containerInfo)
Implements abstract org. Recreate a container during redo recovery. |
| private final void | |
| public int | releaseSavePoint(String
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)Implements org. Release the save point of the given name. |
| public void | removeUpdateTransaction()
Implements abstract org. Remove this from the xactFactory list of update transaction. |
| public void | reprepare()
Implements abstract org. During recovery re-prepare a transaction. |
| pack-priv void | |
| public int | rollbackToSavePoint(String
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)Implements org. Rollback all changes made since the named savepoint was set. |
| protected final void | |
| public final void | setDefaultLockingPolicy(LockingPolicy
The lock policy to use, if null then then a no locking
policy will be installed as the default. policy)Implements org. Set the default locking policy for all operations within this transaction. |
| public void | setFirstLogInstant(LogInstant instant)
Implements abstract org. Set the log instant for the first log record written by this transaction. |
| protected void | |
| public void | setLastLogInstant(LogInstant instant)
Implements abstract org. Set the log instant for the last log record written by this transaction. |
| public void | setNoLockWait(boolean
if noWait)true never wait for a lock in this transaction,
but time out immediatelyImplements org. Tell this transaction whether it should time out immediately if a lock cannot be granted without waiting. |
| pack-priv void | setPostComplete()
Set the transaction to issue pre complete work at postComplete time, instead of preComplete time. |
| protected final void | |
| public int | setSavePoint(String
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)Implements org. Set a save point in the current transaction. |
| pack-priv void | |
| public void | setTransactionId(Loggable beginXact, TransactionId localId)
Implements abstract org. Set the transactionId (Global and internal) of this transaction using a log record that contains the Global id |
| public void | |
| public void | setup(PersistentSet set)
Implements org. The default value for LOCKS_ESCALATION_THRESHOLD |
| private final void | |
| public RawTransaction | startNestedTopTransaction()
Implements abstract org. Start a nested top transaction. |
| protected int | statusForBeginXactLog()
Implements abstract org. put this into the beginXact log record to help recovery if we needs to rolled back first, put that in |
| protected int | statusForEndXactLog()
Implements abstract org. put this into the endXact log record to help recovery, nothing to add |
| private void | |
| public String | |
| public String | Returns: The xid as a string.Overrides java. Return the xid as a string. |
| private void | |
| private void | |
| 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)Implements org. 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.Implements org. This method is called to ask the resource manager to prepare for a transaction commit of the transaction specified in xid. |
| public void | xa_rollback()
Implements org. rollback the current global transaction. |