public class TranExecutorDefault extends java.lang.Object implements TranExecutor
限定符和类型 | 字段和说明 |
---|---|
static TranExecutorDefault |
global |
protected java.lang.ThreadLocal<java.util.Stack<org.noear.solon.data.tran.TranEntity>> |
local |
protected TranNode |
tranMandatory |
protected TranNode |
tranNever |
protected TranNode |
tranNot |
限定符 | 构造器和说明 |
---|---|
protected |
TranExecutorDefault() |
限定符和类型 | 方法和说明 |
---|---|
protected void |
applyDo(java.util.Stack<org.noear.solon.data.tran.TranEntity> stack,
TranNode tran,
Tran meta,
RunnableEx runnable)
应用事务
|
protected TranNode |
create(Tran meta)
创建一个事务节点
|
void |
execute(Tran meta,
RunnableEx runnable)
执行事务
|
protected void |
forNotRoot(java.util.Stack<org.noear.solon.data.tran.TranEntity> stack,
Tran meta,
RunnableEx runnable)
执行非根节点的事务
|
protected void |
forRoot(java.util.Stack<org.noear.solon.data.tran.TranEntity> stack,
Tran meta,
RunnableEx runnable)
执行根节点的事务
|
java.sql.Connection |
getConnection(javax.sql.DataSource ds)
获取链接
|
boolean |
inTrans()
是否在事务中
|
boolean |
inTransAndReadOnly()
是否在事务中且只读
|
void |
listen(TranListener listener)
监听
|
public static final TranExecutorDefault global
protected java.lang.ThreadLocal<java.util.Stack<org.noear.solon.data.tran.TranEntity>> local
protected TranNode tranNot
protected TranNode tranNever
protected TranNode tranMandatory
public boolean inTrans()
inTrans
在接口中 TranExecutor
public boolean inTransAndReadOnly()
inTransAndReadOnly
在接口中 TranExecutor
public java.sql.Connection getConnection(javax.sql.DataSource ds) throws java.sql.SQLException
getConnection
在接口中 TranExecutor
ds
- 数据源java.sql.SQLException
public void listen(TranListener listener) throws java.lang.IllegalStateException
TranExecutor
listen
在接口中 TranExecutor
listener
- 监听器java.lang.IllegalStateException
public void execute(Tran meta, RunnableEx runnable) throws java.lang.Throwable
execute
在接口中 TranExecutor
meta
- 事务注解runnable
- 真实执行器java.lang.Throwable
protected void forRoot(java.util.Stack<org.noear.solon.data.tran.TranEntity> stack, Tran meta, RunnableEx runnable) throws java.lang.Throwable
stack
- 事务栈meta
- 事务注解runnable
- 真实执行器java.lang.Throwable
protected void forNotRoot(java.util.Stack<org.noear.solon.data.tran.TranEntity> stack, Tran meta, RunnableEx runnable) throws java.lang.Throwable
stack
- 事务栈meta
- 事务注解runnable
- 真实执行器java.lang.Throwable
protected void applyDo(java.util.Stack<org.noear.solon.data.tran.TranEntity> stack, TranNode tran, Tran meta, RunnableEx runnable) throws java.lang.Throwable
stack
- 事务栈tran
- 事务节点meta
- 事务注解runnable
- 真实执行器java.lang.Throwable