This class carry transaction metadata including the transaction state.
Metadata include a transaction id, a login and a timeout. The state is used
to track if a transaction is read-only or read-write and what kind of write
accesses have been made in the transaction in case invalidations are needed
at commit or rollback time.
The type is made serializable only for unlog messages that have to be sent
between controllers.
author: Emmanuel Cecchet version: 2.2
Constructor Summary
public
TransactionMetaData(long transactionId, long timeout, String login, boolean isPersistentConnection, long persistentConnectionId) Creates a new TransactionMetaData.
getAcquiredLocks(DatabaseBackend backend) Return the list of locks acquired by the given backend for this transaction
or null if no lock has been acquired so far.
public TransactionMetaData(long transactionId, long timeout, String login, boolean isPersistentConnection, long persistentConnectionId)(Code)
Creates a new TransactionMetaData.
Parameters: transactionId - the transaction identifier. Parameters: timeout - the transaction timeout in seconds. Parameters: login - the user login. Parameters: isPersistentConnection - true if the transaction is started on apersistent connection Parameters: persistentConnectionId - persistent connection id if the transactionmust be started on a persistent connection
Add a lock to the list of locks acquired by the given backend on this
transaction
Parameters: backend - backend acquiring the lock Parameters: lock - the lock that has been acquired
Add locks to the list of locks acquired by the given backend on this
transaction
Parameters: backend - backend acquiring the locks Parameters: locks - the locks that have been acquired
Return the list of locks acquired by the given backend for this transaction
or null if no lock has been acquired so far.
Parameters: backend - backend for which we want to retrieve to set of locks the list of acquired locks for the given backend
final public long getPersistentConnectionId()(Code)
Returns the persistent connection id (only meaningful is
isPersistentConnection is true).
Returns the persistent connection id. See Also:TransactionMetaData.isPersistentConnection()
Returns true if at least one backend is holding locks for this
transactions.
true if a backend has locks for the transactions
isPersistentConnection
final public boolean isPersistentConnection()(Code)
Returns true if the transaction executes on a persistent connection
(retrieve the value using getPersistentConnectionId).
Returns true if transaction uses a persistent connection. See Also:TransactionMetaData.getPersistentConnectionId()
Remove and return the lock list belonging to a backend.
Parameters: backend - backend which locks should be removed the lock list or null if no lock were found for this backend
setAltersAggregateList
final public void setAltersAggregateList(boolean altersAggregateList)(Code)
Sets the altersAggregateList value.
Parameters: altersAggregateList - The altersAggregateList to set.
setAltersDatabaseCatalog
final public void setAltersDatabaseCatalog(boolean altersDatabaseCatalog)(Code)
Sets the altersDatabaseCatalog value.
Parameters: altersDatabaseCatalog - The altersDatabaseCatalog to set.
setAltersDatabaseSchema
final public void setAltersDatabaseSchema(boolean altersDatabaseSchema)(Code)
Sets the altersDatabaseSchema value.
Parameters: altersDatabaseSchema - The altersDatabaseSchema to set.
setAltersMetadataCache
final public void setAltersMetadataCache(boolean altersMetadataCache)(Code)
Sets the altersMetadataCache value.
Parameters: altersMetadataCache - The altersMetadataCache to set.
setAltersQueryResultCache
final public void setAltersQueryResultCache(boolean altersQueryResultCache)(Code)
Sets the altersQueryResultCache value.
Parameters: altersQueryResultCache - The altersQueryResultCache to set.
setAltersSomething
final public void setAltersSomething(boolean altersSomething)(Code)
Sets the altersSomething value.
Parameters: altersSomething - The altersSomething to set.
setAltersStoredProcedureList
final public void setAltersStoredProcedureList(boolean altersStoredProcedureList)(Code)
Sets the altersStoredProcedureList value.
Parameters: altersStoredProcedureList - The altersStoredProcedureList to set.
setAltersUserDefinedTypes
final public void setAltersUserDefinedTypes(boolean altersUserDefinedTypes)(Code)
Sets the altersUserDefinedTypes value.
Parameters: altersUserDefinedTypes - The altersUserDefinedTypes to set.
setAltersUsers
final public void setAltersUsers(boolean altersUsers)(Code)
Sets the altersUsers value.
Parameters: altersUsers - The altersUsers to set.