public class DefaultTransactionManager extends java.lang.Object implements TransactionManager
限定符和类型 | 字段和说明 |
---|---|
protected java.lang.ThreadLocal<Transaction> |
curTransaction |
protected DataSourceManager |
dataSourceManager |
构造器和说明 |
---|
DefaultTransactionManager(DataSourceManager dataSourceManager) |
限定符和类型 | 方法和说明 |
---|---|
boolean |
currentThreadInTransaction()
判断当前线程是否在事务中
|
Transaction |
get(java.lang.Integer isolationLevel)
获取事务控制器
|
Transaction |
getCurTransaction()
获取当前事务控制器
|
boolean |
isOpenTransaction()
判断当前事务是否开启
|
void |
remove()
移除事务控制器
|
protected final DataSourceManager dataSourceManager
protected final java.lang.ThreadLocal<Transaction> curTransaction
public DefaultTransactionManager(DataSourceManager dataSourceManager)
public Transaction get(java.lang.Integer isolationLevel)
TransactionManager
get
在接口中 TransactionManager
isolationLevel
- 事务隔离级别public void remove()
TransactionManager
remove
在接口中 TransactionManager
public Transaction getCurTransaction()
TransactionManager
getCurTransaction
在接口中 TransactionManager
public boolean currentThreadInTransaction()
TransactionManager
currentThreadInTransaction
在接口中 TransactionManager
public boolean isOpenTransaction()
TransactionManager
isOpenTransaction
在接口中 TransactionManager