public class SpringConnectionSource
extends org.beetl.sql.core.DefaultConnectionSource
| 构造器和说明 |
|---|
SpringConnectionSource() |
SpringConnectionSource(DataSource master,
DataSource[] slaves) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
applyConnectionSetting(org.beetl.sql.core.ExecuteContext ctx,
Connection conn) |
void |
applyStatementSetting(org.beetl.sql.core.ExecuteContext ctx,
Connection conn,
Statement statement) |
void |
closeConnection(Connection conn,
org.beetl.sql.core.ExecuteContext ctx,
boolean isUpdate) |
protected Connection |
doGetConnection(org.beetl.sql.core.ExecuteContext ctx,
DataSource ds) |
Connection |
getConn(org.beetl.sql.core.ExecuteContext ctx,
boolean isUpdate) |
protected DataSource |
getDatasourceFromContext(org.beetl.sql.core.ExecuteContext ctx) |
DataSource |
getMasterSource() |
DataSource[] |
getSlaveSource() |
boolean |
isTransaction() |
void |
setMasterSource(DataSource master) |
void |
setSlaveSource(DataSource[] slaves) |
getMasterConn, getMetaData, getReadConn, getSlaves, getWriteConn, nextSlaveConnpublic SpringConnectionSource()
public SpringConnectionSource(DataSource master, DataSource[] slaves)
public Connection getConn(org.beetl.sql.core.ExecuteContext ctx, boolean isUpdate)
getConn 在接口中 org.beetl.sql.core.ConnectionSourcegetConn 在类中 org.beetl.sql.core.DefaultConnectionSourcepublic boolean isTransaction()
isTransaction 在接口中 org.beetl.sql.core.ConnectionSourceisTransaction 在类中 org.beetl.sql.core.DefaultConnectionSourceprotected Connection doGetConnection(org.beetl.sql.core.ExecuteContext ctx, DataSource ds)
doGetConnection 在类中 org.beetl.sql.core.DefaultConnectionSourcepublic DataSource getMasterSource()
getMasterSource 在接口中 org.beetl.sql.core.ConnectionSourcegetMasterSource 在类中 org.beetl.sql.core.DefaultConnectionSourcepublic void setMasterSource(DataSource master)
setMasterSource 在类中 org.beetl.sql.core.DefaultConnectionSourcepublic DataSource[] getSlaveSource()
public void setSlaveSource(DataSource[] slaves)
public void applyStatementSetting(org.beetl.sql.core.ExecuteContext ctx,
Connection conn,
Statement statement)
throws SQLException
SQLExceptionpublic void applyConnectionSetting(org.beetl.sql.core.ExecuteContext ctx,
Connection conn)
public void closeConnection(Connection conn, org.beetl.sql.core.ExecuteContext ctx, boolean isUpdate)
protected DataSource getDatasourceFromContext(org.beetl.sql.core.ExecuteContext ctx)
Copyright © 2024. All rights reserved.