|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgoldengate.common.database.DbAdmin
public class DbAdmin
Class for access to Database
Field Summary | |
---|---|
boolean |
isConnected
Is this DB Admin connected |
boolean |
isMultipleDBAccess
Is this DB Admin accessed by only one thread at a time (no concurrency and no lock/unlock problem) |
boolean |
isReadOnly
Is this DB Admin Read Only |
static int |
nbHttpSession
Number of HttpSession |
static int |
RETRYNB
|
DbSession |
session
session is the Session object for all type of requests |
DbType |
typeDriver
Database type |
static long |
WAITFORNETOP
|
Constructor Summary | |
---|---|
DbAdmin()
Empty constructor for no Database support (very thin client) |
|
DbAdmin(Connection conn,
boolean isread)
Use a default server for basic connection. |
|
DbAdmin(DbType driver,
String server,
String user,
String passwd)
Use a default server for basic connection. |
|
DbAdmin(DbType driver,
String server,
String user,
String passwd,
boolean write)
Use a default server for basic connection. |
Method Summary | |
---|---|
static void |
addConnection(long id,
DbSession session)
Add a Connection into the list |
static void |
checkAllConnections()
Check all database connections and try to reopen them if disconnected |
void |
close()
Close the underlying session. |
static void |
closeAllConnection()
Close all database connections |
void |
commit()
Commit on connection (since in autocommit, should not be used) |
static int |
getNbConnection()
|
String |
getPasswd()
|
String |
getServer()
|
String |
getUser()
|
static void |
removeConnection(long id)
Remove a Connection from the list |
String |
toString()
|
void |
validConnection()
Validate connection |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static int RETRYNB
public static long WAITFORNETOP
public DbType typeDriver
public boolean isConnected
public boolean isReadOnly
public boolean isMultipleDBAccess
public DbSession session
public static int nbHttpSession
Constructor Detail |
---|
public DbAdmin(DbType driver, String server, String user, String passwd) throws GoldenGateDatabaseNoConnectionException
driver
- server
- user
- passwd
-
GoldenGateDatabaseNoConnectionException
public DbAdmin(DbType driver, String server, String user, String passwd, boolean write) throws GoldenGateDatabaseNoConnectionException
driver
- server
- user
- passwd
- write
-
GoldenGateDatabaseSqlException
GoldenGateDatabaseNoConnectionException
public DbAdmin(Connection conn, boolean isread) throws GoldenGateDatabaseNoConnectionException
conn
- isread
-
GoldenGateDatabaseNoConnectionException
public DbAdmin()
Method Detail |
---|
public void validConnection() throws GoldenGateDatabaseNoConnectionException
GoldenGateDatabaseNoConnectionException
public void close()
public void commit() throws GoldenGateDatabaseSqlException, GoldenGateDatabaseNoConnectionException
GoldenGateDatabaseNoConnectionException
GoldenGateDatabaseSqlException
public String getServer()
public String getUser()
public String getPasswd()
public String toString()
toString
in class Object
public static void addConnection(long id, DbSession session)
id
- session
- public static void removeConnection(long id)
id
- Id of the connectionpublic static int getNbConnection()
public static void closeAllConnection()
public static void checkAllConnections()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |