类 SuspendableXAConnection
- java.lang.Object
-
- com.mysql.cj.jdbc.MysqlPooledConnection
-
- com.mysql.cj.jdbc.SuspendableXAConnection
-
- 所有已实现的接口:
PooledConnection,XAConnection,XAResource
public class SuspendableXAConnection extends MysqlPooledConnection implements XAConnection, XAResource
-
-
字段概要
-
从类继承的字段 com.mysql.cj.jdbc.MysqlPooledConnection
CONNECTION_CLOSED_EVENT, CONNECTION_ERROR_EVENT
-
从接口继承的字段 javax.transaction.xa.XAResource
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY
-
-
构造器概要
构造器 构造器 说明 SuspendableXAConnection(JdbcConnection connection)
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 voidclose()Invoked by the container (not the client), and should close the physical connection.voidcommit(Xid xid, boolean arg1)voidend(Xid xid, int arg1)voidforget(Xid xid)ConnectiongetConnection()protected static SuspendableXAConnectiongetInstance(JdbcConnection mysqlConnection)intgetTransactionTimeout()XAResourcegetXAResource()booleanisSameRM(XAResource xaRes)intprepare(Xid xid)Xid[]recover(int flag)voidrollback(Xid xid)booleansetTransactionTimeout(int arg0)voidstart(Xid xid, int arg1)-
从类继承的方法 com.mysql.cj.jdbc.MysqlPooledConnection
addConnectionEventListener, addStatementEventListener, callConnectionEventListeners, getConnection, getExceptionInterceptor, removeConnectionEventListener, removeStatementEventListener
-
-
-
-
构造器详细资料
-
SuspendableXAConnection
public SuspendableXAConnection(JdbcConnection connection)
-
-
方法详细资料
-
getInstance
protected static SuspendableXAConnection getInstance(JdbcConnection mysqlConnection) throws SQLException
- 抛出:
SQLException
-
getXAResource
public XAResource getXAResource() throws SQLException
- 指定者:
getXAResource在接口中XAConnection- 抛出:
SQLException
-
commit
public void commit(Xid xid, boolean arg1) throws XAException
- 指定者:
commit在接口中XAResource- 抛出:
XAException
-
end
public void end(Xid xid, int arg1) throws XAException
- 指定者:
end在接口中XAResource- 抛出:
XAException
-
forget
public void forget(Xid xid) throws XAException
- 指定者:
forget在接口中XAResource- 抛出:
XAException
-
getTransactionTimeout
public int getTransactionTimeout() throws XAException- 指定者:
getTransactionTimeout在接口中XAResource- 抛出:
XAException
-
isSameRM
public boolean isSameRM(XAResource xaRes) throws XAException
- 指定者:
isSameRM在接口中XAResource- 抛出:
XAException
-
prepare
public int prepare(Xid xid) throws XAException
- 指定者:
prepare在接口中XAResource- 抛出:
XAException
-
recover
public Xid[] recover(int flag) throws XAException
- 指定者:
recover在接口中XAResource- 抛出:
XAException
-
rollback
public void rollback(Xid xid) throws XAException
- 指定者:
rollback在接口中XAResource- 抛出:
XAException
-
setTransactionTimeout
public boolean setTransactionTimeout(int arg0) throws XAException- 指定者:
setTransactionTimeout在接口中XAResource- 抛出:
XAException
-
start
public void start(Xid xid, int arg1) throws XAException
- 指定者:
start在接口中XAResource- 抛出:
XAException
-
getConnection
public Connection getConnection() throws SQLException
- 指定者:
getConnection在接口中PooledConnection- 覆盖:
getConnection在类中MysqlPooledConnection- 抛出:
SQLException
-
close
public void close() throws SQLException从类复制的说明:MysqlPooledConnectionInvoked by the container (not the client), and should close the physical connection. This will be called if the pool is destroyed or the connectionEventListener receives a connectionErrorOccurred event.- 指定者:
close在接口中PooledConnection- 覆盖:
close在类中MysqlPooledConnection- 抛出:
SQLException
-
-