public class ConnectionSet
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
autoCommit |
static int |
TYPE_FAKE |
static int |
TYPE_MASTER |
static int |
TYPE_SLAVE |
static int |
TYPE_TRASH |
Modifier | Constructor and Description |
---|---|
protected |
ConnectionSet(java.sql.Connection master) |
protected |
ConnectionSet(java.sql.Connection master,
boolean autoCommit) |
|
ConnectionSet(ConnectionPool setup,
boolean autoCommit) |
Modifier and Type | Method and Description |
---|---|
void |
commit() |
protected void |
finalize() |
boolean |
getAutoCommit() |
java.sql.Connection |
getConnection() |
java.sql.Connection |
getSlaveConnection() |
java.sql.Connection |
getTrashConnection(java.lang.String tableName,
int defaultType) |
protected java.sql.Connection |
newMasterConnection() |
protected java.sql.Connection |
newSlaveConnection() |
protected java.sql.Connection |
newTrashConnection(java.lang.String tableName) |
void |
recycle() |
void |
rollback() |
void |
setAutoCommit(boolean autoCommit) |
public static final int TYPE_MASTER
public static final int TYPE_SLAVE
public static final int TYPE_TRASH
public static final int TYPE_FAKE
protected boolean autoCommit
protected ConnectionSet(java.sql.Connection master)
protected ConnectionSet(java.sql.Connection master, boolean autoCommit)
public ConnectionSet(ConnectionPool setup, boolean autoCommit)
public java.sql.Connection getConnection()
protected java.sql.Connection newMasterConnection()
protected java.sql.Connection newSlaveConnection()
protected java.sql.Connection newTrashConnection(java.lang.String tableName)
public java.sql.Connection getSlaveConnection()
public java.sql.Connection getTrashConnection(java.lang.String tableName, int defaultType)
public void commit() throws BGException
BGException
public void recycle()
public boolean getAutoCommit()
public void setAutoCommit(boolean autoCommit)
public void rollback()
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable