|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.w3c.tools.jdbc.ConnectionManager
Field Summary | |
protected java.util.Comparator |
conn_comparator
|
protected int |
conn_count
|
protected int |
conn_max
|
protected int |
conn2free
|
protected LRUList |
connectionsLru
The LRU list of idle connections. |
static boolean |
debug
|
protected int |
state
|
static int |
STATE_CHANGED
|
static int |
STATE_UNCHANGED
|
protected java.util.LinkedList |
usedConnections
The LRU list of used connection |
static long |
WAIT_TIMEOUT
|
Method Summary | |
protected JdbcConnection |
allocateConnection(JdbcServer server)
Connections management - Allocate a new connection for this server. |
protected void |
deleteConnection(JdbcConnection conn)
|
protected void |
freeConnections()
PANIC, we need to close some used connection. |
protected JdbcConnection |
getConnection(JdbcServer server)
Get a connection to the given server. |
static ConnectionManager |
getManager()
|
static ConnectionManager |
getManager(java.util.Properties p)
Get an instance of the Jdbc manager. |
protected boolean |
negotiateConnection(JdbcServer server)
|
protected void |
notifyConnection(JdbcConnection conn)
A new connection has just been created. |
void |
notifyIdle(JdbcConnection conn)
The given connection can be reused, but is now idle. |
void |
notifyUse(JdbcConnection conn)
The given connection is about to be used. |
boolean |
propertyChanged(java.lang.String name)
PropertyMonitoring implementation. |
protected void |
waitForConnection(JdbcServer server)
Wait for a connection to come up. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final long WAIT_TIMEOUT
public static final boolean debug
public static final int STATE_UNCHANGED
public static final int STATE_CHANGED
protected int state
protected int conn_count
protected int conn_max
protected int conn2free
protected LRUList connectionsLru
protected java.util.LinkedList usedConnections
protected java.util.Comparator conn_comparator
Method Detail |
public boolean propertyChanged(java.lang.String name)
name
- The name of the property that changed.protected JdbcConnection getConnection(JdbcServer server)
server
- the jdbc server.protected void freeConnections()
protected JdbcConnection allocateConnection(JdbcServer server)
server
- the JdbcServerprotected boolean negotiateConnection(JdbcServer server)
protected void deleteConnection(JdbcConnection conn)
protected void notifyConnection(JdbcConnection conn)
conn
- the new connectionpublic void notifyUse(JdbcConnection conn)
conn
- The idle connection.public void notifyIdle(JdbcConnection conn)
conn
- The connection that is now idle.protected void waitForConnection(JdbcServer server) throws java.lang.InterruptedException
server,
- the target server.public static ConnectionManager getManager(java.util.Properties p)
public static ConnectionManager getManager()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |