public class TransactionManager extends Object
Keeps the Cache and Cluster in synch when transactions are committed.
| Modifier and Type | Class and Description |
|---|---|
static class |
TransactionManager.OnQueryOnly
The behaviour desired when ending a query only transaction.
|
| Modifier and Type | Field and Description |
|---|---|
static org.slf4j.Logger |
SQL_LOGGER |
static org.slf4j.Logger |
SUM_LOGGER |
static org.slf4j.Logger |
TXN_LOGGER |
| Constructor and Description |
|---|
TransactionManager(ClusterManager clusterManager,
BackgroundExecutor backgroundExecutor,
ServerConfig config,
BeanDescriptorManager descMgr,
BootupClasses bootupClasses)
Create the TransactionManager
|
| Modifier and Type | Method and Description |
|---|---|
SpiTransaction |
createQueryTransaction() |
SpiTransaction |
createTransaction(boolean explicit,
int isolationLevel)
Create a new Transaction.
|
void |
externalModification(TransactionEventTable tableEvents)
Process a Transaction that comes from another framework or local code.
|
BeanDescriptorManager |
getBeanDescriptorManager() |
BulkEventListenerMap |
getBulkEventListenerMap() |
int |
getClusterDebugLevel()
Return the cluster debug level.
|
DataSource |
getDataSource() |
TransactionManager.OnQueryOnly |
getOnQueryOnly()
Defines the type of behaviour to use when closing a transaction that was used to query data only.
|
String |
getServerName() |
void |
notifyOfCommit(SpiTransaction transaction)
Process a local committed transaction.
|
void |
notifyOfQueryOnly(boolean onCommit,
SpiTransaction transaction,
Throwable cause)
Query only transaction in read committed isolation.
|
void |
notifyOfRollback(SpiTransaction transaction,
Throwable cause)
Process a local rolled back transaction.
|
void |
remoteTransactionEvent(RemoteTransactionEvent remoteEvent)
Notify local BeanPersistListeners etc of events from another server in the cluster.
|
void |
setClusterDebugLevel(int clusterDebugLevel)
Set the cluster debug level.
|
void |
shutdown(boolean shutdownDataSource,
boolean deregisterDriver) |
SpiTransaction |
wrapExternalConnection(Connection c)
Wrap the externally supplied Connection.
|
SpiTransaction |
wrapExternalConnection(String id,
Connection c)
Wrap an externally supplied Connection with a known transaction id.
|
public static final org.slf4j.Logger SQL_LOGGER
public static final org.slf4j.Logger SUM_LOGGER
public static final org.slf4j.Logger TXN_LOGGER
public TransactionManager(ClusterManager clusterManager, BackgroundExecutor backgroundExecutor, ServerConfig config, BeanDescriptorManager descMgr, BootupClasses bootupClasses)
public void shutdown(boolean shutdownDataSource,
boolean deregisterDriver)
public BeanDescriptorManager getBeanDescriptorManager()
public BulkEventListenerMap getBulkEventListenerMap()
public String getServerName()
public DataSource getDataSource()
public int getClusterDebugLevel()
public void setClusterDebugLevel(int clusterDebugLevel)
public TransactionManager.OnQueryOnly getOnQueryOnly()
public SpiTransaction wrapExternalConnection(Connection c)
public SpiTransaction wrapExternalConnection(String id, Connection c)
public SpiTransaction createTransaction(boolean explicit, int isolationLevel)
public SpiTransaction createQueryTransaction()
public void notifyOfRollback(SpiTransaction transaction, Throwable cause)
public void notifyOfQueryOnly(boolean onCommit,
SpiTransaction transaction,
Throwable cause)
public void notifyOfCommit(SpiTransaction transaction)
public void externalModification(TransactionEventTable tableEvents)
For cases where raw SQL/JDBC or other frameworks are used this can invalidate the appropriate parts of the cache.
public void remoteTransactionEvent(RemoteTransactionEvent remoteEvent)
Copyright © 2014. All Rights Reserved.