| Modifier and Type | Field and Description |
|---|---|
| private Object | blockingKey
Key in blockingMap on which this transaction is blocked. |
| private String | blockingMapName
Map on which this transaction is blocked. |
| private volatile Transaction | blockingTransaction
Blocking transaction, if any |
| pack-priv final IsolationLevel | isolationLevel
The current isolation level. |
| pack-priv final TransactionStore. | listener
Listener for this transaction's rollback changes. |
| pack-priv static final int | LOG_ID_BITS
How many bits of the "operation id" we store in the transaction belong to the log id (the rest belong to the transaction id). |
| private static final int | |
| private static final long | |
| private static final long | |
| private String | name
Transaction name. |
| private volatile boolean | notificationRequested
Whether other transaction(s) are waiting for this to close. |
| private final int | ownerId
Identification of the owner of this transaction, usually the owner is a database session. |
| pack-priv final long | sequenceNum
This is really a transaction identity, because it's not re-used. |
| private static final int | |
| public static final int | STATUS_CLOSED
The status of a closed transaction (committed or rolled back). |
| public static final int | STATUS_COMMITTED
The status of a transaction that has been logically committed or rather marked as committed, because it might be still listed among prepared, if it was prepared for commit. |
| private static final int | |
| private static final String[] | |
| public static final int | STATUS_OPEN
The status of an open transaction. |
| public static final int | STATUS_PREPARED
The status of a prepared transaction. |
| private static final int | STATUS_ROLLED_BACK
The status of a transaction that has been rolled back completely, but undo operations are not finished yet. |
| private static final int | STATUS_ROLLING_BACK
The status of a transaction that currently in a process of rolling back to a savepoint. |
| private final AtomicLong | |
| pack-priv final TransactionStore | store
The transaction store. |
| pack-priv int | timeoutMillis
How long to wait for blocking transaction to commit or rollback. |
| pack-priv final int | transactionId
The transaction id. More appropriate name for this field would be "slotId" |
| private final Map | transactionMaps
Map of transactional maps for this transaction |
| private MVStore. | txCounter
Reference to a counter for an earliest store version used by this transaction. |
| private RootReference | undoLogRootReferences
RootReferences for undo log snapshots |
| pack-priv boolean | wasStored
Indicates whether this transaction was stored in preparedTransactions map |
| Access | Constructor and Description |
|---|---|
| pack-priv | Transaction(TransactionStore store, int transactionId, long sequenceNum, int status, String name, long logId, int timeoutMillis, int ownerId, IsolationLevel isolationLevel, TransactionStore.
|
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if isolation level is READ_COMMITTED or READ_UNCOMMITTEDWhether this transaction has isolation level READ_COMMITTED or below. |
| private void | |
| private void | |
| pack-priv void | |
| public void | |
| private static long | |
| public int | |
| public Iterator | Returns: the changesthe savepoint id, 0 meaning the beginning of the
transaction savepointId)Get the list of changes, starting with the latest change, up to the given savepoint (in reverse order than they occurred). |
| public int | |
| public IsolationLevel | Returns: the isolation level of this transactionReturns the isolation level of this transaction. |
| private long | |
| private static long | |
| public String | |
| public long | |
| public int | |
| private static int | |
| private static String | |
| pack-priv RootReference | |
| public boolean | Returns: true if there are changes to commit, false otherwiseDetermine if any database changes were made as part of this transaction. |
| private static boolean | |
| private static boolean | |
| public boolean | Returns: whether statement dependencies are currently setReturns whether statement dependencies are currently set. |
| private static boolean | |
| private boolean | |
| pack-priv boolean | |
| pack-priv long | |
| pack-priv void | |
| public void | |
| public void | markStatementStart(HashSet<MVMap<Object, VersionedValue<Object>>>
set of maps used by transaction or statement is about to be executed maps)Mark an entry into a new SQL statement execution within this transaction. |
| private void | |
| private void | |
| public < the key type K, the value type V> TransactionMap | |
| public < the key type K, the value type V> TransactionMap | |
| public < the key type K, the value type V> TransactionMap | Returns: the transactional mapthe base map map)Open the transactional version of the given map. |
| public void | |
| private void | |
| public < the key type K, the value type V> void | |
| public void | |
| public void | |
| public void | |
| public long | |
| private long | Returns: transaction state as it was before status changeto be set status)Changes transaction status to a specified value |
| public void | |
| private String | |
| private static String | |
| public String | |
| private void | |
| public boolean | Returns: true if other transaction was closed and this one can proceed, false if timed outtransaction to wait for toWaitFor, String name of the map containing blocking entry mapName, Object of the blocking entry key, int timeout in milliseconds, timeoutMillis)-1 for defaultMake this transaction to wait for the specified transaction to be closed, because both of them try to modify the same map entry. |
| private synchronized boolean |
| blockingKey | back to summary |
|---|---|
| private Object blockingKey Key in blockingMap on which this transaction is blocked. | |
| blockingMapName | back to summary |
|---|---|
| private String blockingMapName Map on which this transaction is blocked. | |
| blockingTransaction | back to summary |
|---|---|
| private volatile Transaction blockingTransaction Blocking transaction, if any | |
| isolationLevel | back to summary |
|---|---|
| pack-priv final IsolationLevel isolationLevel The current isolation level. | |
| listener | back to summary |
|---|---|
| pack-priv final TransactionStore. Listener for this transaction's rollback changes. | |
| LOG_ID_BITS | back to summary |
|---|---|
| pack-priv static final int LOG_ID_BITS How many bits of the "operation id" we store in the transaction belong to the log id (the rest belong to the transaction id). | |
| LOG_ID_BITS1 | back to summary |
|---|---|
| private static final int LOG_ID_BITS1 | |
| LOG_ID_LIMIT | back to summary |
|---|---|
| private static final long LOG_ID_LIMIT | |
| LOG_ID_MASK | back to summary |
|---|---|
| private static final long LOG_ID_MASK | |
| name | back to summary |
|---|---|
| private String name Transaction name. | |
| notificationRequested | back to summary |
|---|---|
| private volatile boolean notificationRequested Whether other transaction(s) are waiting for this to close. | |
| ownerId | back to summary |
|---|---|
| private final int ownerId Identification of the owner of this transaction, usually the owner is a database session. | |
| sequenceNum | back to summary |
|---|---|
| pack-priv final long sequenceNum This is really a transaction identity, because it's not re-used. | |
| STATUS_BITS | back to summary |
|---|---|
| private static final int STATUS_BITS | |
| STATUS_CLOSED | back to summary |
|---|---|
| public static final int STATUS_CLOSED The status of a closed transaction (committed or rolled back). | |
| STATUS_COMMITTED | back to summary |
|---|---|
| public static final int STATUS_COMMITTED The status of a transaction that has been logically committed or rather marked as committed, because it might be still listed among prepared, if it was prepared for commit. Undo log entries might still exists for it and not all of it's changes within map's are re-written as committed yet. Nevertheless, those changes should be already viewed by other transactions as committed. This transaction's id can not be re-used until all of the above is completed and transaction is closed. A transactions can be observed in this state when the store was closed while the transaction was not closed yet. When opening a store, such transactions will automatically be processed and closed as committed. | |
| STATUS_MASK | back to summary |
|---|---|
| private static final int STATUS_MASK | |
| STATUS_NAMES | back to summary |
|---|---|
| private static final String[] STATUS_NAMES | |
| STATUS_OPEN | back to summary |
|---|---|
| public static final int STATUS_OPEN The status of an open transaction. | |
| STATUS_PREPARED | back to summary |
|---|---|
| public static final int STATUS_PREPARED The status of a prepared transaction. | |
| STATUS_ROLLED_BACK | back to summary |
|---|---|
| private static final int STATUS_ROLLED_BACK The status of a transaction that has been rolled back completely, but undo operations are not finished yet. | |
| STATUS_ROLLING_BACK | back to summary |
|---|---|
| private static final int STATUS_ROLLING_BACK The status of a transaction that currently in a process of rolling back to a savepoint. | |
| statusAndLogId | back to summary |
|---|---|
| private final AtomicLong statusAndLogId | |
| store | back to summary |
|---|---|
| pack-priv final TransactionStore store The transaction store. | |
| timeoutMillis | back to summary |
|---|---|
| pack-priv int timeoutMillis How long to wait for blocking transaction to commit or rollback. | |
| transactionId | back to summary |
|---|---|
| pack-priv final int transactionId The transaction id. More appropriate name for this field would be "slotId" | |
| transactionMaps | back to summary |
|---|---|
| private final Map<Integer, TransactionMap<?, ?>> transactionMaps Map of transactional maps for this transaction | |
| txCounter | back to summary |
|---|---|
| private MVStore. Reference to a counter for an earliest store version used by this transaction. Referenced version and all newer ones can not be discarded at least until this transaction ends. | |
| undoLogRootReferences | back to summary |
|---|---|
| private RootReference<Long, Record<?, ?>>[] undoLogRootReferences RootReferences for undo log snapshots | |
| wasStored | back to summary |
|---|---|
| pack-priv boolean wasStored Indicates whether this transaction was stored in preparedTransactions map | |
| Transaction | back to summary |
|---|---|
| pack-priv Transaction(TransactionStore store, int transactionId, long sequenceNum, int status, String name, long logId, int timeoutMillis, int ownerId, IsolationLevel isolationLevel, TransactionStore. | |
| allowNonRepeatableRead | back to summary |
|---|---|
| public boolean allowNonRepeatableRead() Whether this transaction has isolation level READ_COMMITTED or below.
| |
| checkNotClosed | back to summary |
|---|---|
| private void checkNotClosed() Check whether this transaction is open or prepared. | |
| checkOpen | back to summary |
|---|---|
| private void checkOpen(int status) Check whether this transaction is open. | |
| closeIt | back to summary |
|---|---|
| pack-priv void closeIt() Transition this transaction into a closed state. | |
| commit | back to summary |
|---|---|
| public void commit() Commit the transaction. Afterwards, this transaction is closed. | |
| composeState | back to summary |
|---|---|
| private static long composeState(int status, long logId, boolean hasRollback) | |
| getBlockerId | back to summary |
|---|---|
| public int getBlockerId() | |
| getChanges | back to summary |
|---|---|
| public Iterator Get the list of changes, starting with the latest change, up to the given savepoint (in reverse order than they occurred). The value of the change is the value before the change was applied.
| |
| getId | back to summary |
|---|---|
| public int getId() | |
| getIsolationLevel | back to summary |
|---|---|
| public IsolationLevel getIsolationLevel() Returns the isolation level of this transaction.
| |
| getLogId | back to summary |
|---|---|
| private long getLogId() | |
| getLogId | back to summary |
|---|---|
| private static long getLogId(long state) | |
| getName | back to summary |
|---|---|
| public String getName() | |
| getSequenceNum | back to summary |
|---|---|
| public long getSequenceNum() | |
| getStatus | back to summary |
|---|---|
| public int getStatus() | |
| getStatus | back to summary |
|---|---|
| private static int getStatus(long state) | |
| getStatusName | back to summary |
|---|---|
| private static String getStatusName(int status) | |
| getUndoLogRootReferences | back to summary |
|---|---|
| pack-priv RootReference | |
| hasChanges | back to summary |
|---|---|
| public boolean hasChanges() Determine if any database changes were made as part of this transaction.
| |
| hasChanges | back to summary |
|---|---|
| private static boolean hasChanges(long state) | |
| hasRollback | back to summary |
|---|---|
| private static boolean hasRollback(long state) | |
| hasStatementDependencies | back to summary |
|---|---|
| public boolean hasStatementDependencies() Returns whether statement dependencies are currently set.
| |
| isActive | back to summary |
|---|---|
| private static boolean isActive(int status) | |
| isDeadlocked | back to summary |
|---|---|
| private boolean isDeadlocked(Transaction toWaitFor) | |
| isReadCommitted | back to summary |
|---|---|
| pack-priv boolean isReadCommitted() | |
| log | back to summary |
|---|---|
| pack-priv long log(Record<?, ?> logRecord) Add a log entry.
| |
| logUndo | back to summary |
|---|---|
| pack-priv void logUndo() Remove the last log entry. | |
| markStatementEnd | back to summary |
|---|---|
| public void markStatementEnd() Mark an exit from SQL statement execution within this transaction. | |
| markStatementStart | back to summary |
|---|---|
| public void markStatementStart(HashSet<MVMap<Object, VersionedValue<Object>>> maps) Mark an entry into a new SQL statement execution within this transaction.
| |
| markTransactionEnd | back to summary |
|---|---|
| private void markTransactionEnd() | |
| notifyAllWaitingTransactions | back to summary |
|---|---|
| private void notifyAllWaitingTransactions() | |
| openMap | back to summary |
|---|---|
| public <K, V> TransactionMap Open a data map.
| |
| openMap | back to summary |
|---|---|
| public <K, V> TransactionMap Open the map to store the data.
| |
| openMapX | back to summary |
|---|---|
| public <K, V> TransactionMap Open the transactional version of the given map.
| |
| prepare | back to summary |
|---|---|
| public void prepare() Prepare the transaction. Afterwards, the transaction can only be committed or completely rolled back. | |
| releaseSnapshot | back to summary |
|---|---|
| private void releaseSnapshot() | |
| removeMap | back to summary |
|---|---|
| public <K, V> void removeMap(TransactionMap<K, V> map) Remove the map.
| |
| rollback | back to summary |
|---|---|
| public void rollback() Roll the transaction back. Afterwards, this transaction is closed. | |
| rollbackToSavepoint | back to summary |
|---|---|
| public void rollbackToSavepoint(long savepointId) Roll back to the given savepoint. This is only allowed if the transaction is open.
| |
| setName | back to summary |
|---|---|
| public void setName(String name) | |
| setSavepoint | back to summary |
|---|---|
| public long setSavepoint() Create a new savepoint.
| |
| setStatus | back to summary |
|---|---|
| private long setStatus(int status) Changes transaction status to a specified value
| |
| setTimeoutMillis | back to summary |
|---|---|
| public void setTimeoutMillis(int timeoutMillis) Sets the new lock timeout.
| |
| stateToString | back to summary |
|---|---|
| private String stateToString() | |
| stateToString | back to summary |
|---|---|
| private static String stateToString(long state) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| tryThrowDeadLockException | back to summary |
|---|---|
| private void tryThrowDeadLockException(boolean throwIt) | |
| waitFor | back to summary |
|---|---|
| public boolean waitFor(Transaction toWaitFor, String mapName, Object key, int timeoutMillis) Make this transaction to wait for the specified transaction to be closed, because both of them try to modify the same map entry.
| |
| waitForThisToEnd | back to summary |
|---|---|
| private synchronized boolean waitForThisToEnd(int millis, Transaction waiter) | |