org.experlog.db
Class ESSimpleConnection

java.lang.Object
  extended by org.experlog.db.ESSimpleConnection

public class ESSimpleConnection
extends java.lang.Object

ESSimpleConnection stores a physical connection (from the jdbc pool, the number of allocated connections from this one, and a list of clientId, which use currently this connection


Field Summary
 java.sql.Connection con
           
 int count
           
 java.util.Vector list
           
 
Constructor Summary
ESSimpleConnection(java.sql.Connection connect, java.lang.String clientId)
          constructor
 
Method Summary
 boolean findClient(java.lang.String clientId)
          find the client (clientId), returns true if found, else false
 java.sql.Connection getConnection(java.lang.String clientId)
          return the current connection one more client works with it.
 int getCount()
          return the number of clients which use the connection
 int removeClient(java.lang.String clientId)
          remove the client (clientId) and return the number of clients which use the connection now.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

count

public int count

con

public java.sql.Connection con

list

public java.util.Vector list
Constructor Detail

ESSimpleConnection

public ESSimpleConnection(java.sql.Connection connect,
                          java.lang.String clientId)
constructor

Method Detail

getConnection

public java.sql.Connection getConnection(java.lang.String clientId)
return the current connection one more client works with it.


findClient

public boolean findClient(java.lang.String clientId)
find the client (clientId), returns true if found, else false


removeClient

public int removeClient(java.lang.String clientId)
remove the client (clientId) and return the number of clients which use the connection now.


getCount

public int getCount()
return the number of clients which use the connection