com.ibm.dse.services.jdbc
Class SharedConnection
java.lang.Object
|
+--com.ibm.dse.services.jdbc.SharedConnection
- public class SharedConnection
- extends java.lang.Object
The SharedConnection class keeps information about a database connection being shared by different JDBC services instances.
Constructor Summary |
SharedConnection()
This constructor creates a SharedConnection object. |
SharedConnection(java.sql.Connection aDatabaseConnection)
This constructor creates a SharedConnection object and sets its databaseConnection attribute to aDatabaseConnection and its
counter attribute to 1. |
Method Summary |
protected int |
getCounter()
Returns the counter attribute value. |
protected java.sql.Connection |
getDatabaseConnection()
Returns the databaseConnection attribute value. |
protected void |
setCounter(int newCounter)
Sets the counter attribute value to newCounter. |
protected void |
setDatabaseConnection(java.sql.Connection newDatabaseConnection)
Sets the databaseConnection attribute value to newDatabaseConnection. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
SharedConnection
public SharedConnection()
- This constructor creates a SharedConnection object.
SharedConnection
public SharedConnection(java.sql.Connection aDatabaseConnection)
- This constructor creates a SharedConnection object and sets its databaseConnection attribute to aDatabaseConnection and its
counter attribute to 1.
- Parameters:
aDatabaseConnection
- java.sql.Connection
getCounter
protected int getCounter()
- Returns the counter attribute value.
- Returns:
- int
getDatabaseConnection
protected java.sql.Connection getDatabaseConnection()
- Returns the databaseConnection attribute value.
- Returns:
- java.sql.Connection
setCounter
protected void setCounter(int newCounter)
- Sets the counter attribute value to newCounter.
- Parameters:
newCounter
- int
setDatabaseConnection
protected void setDatabaseConnection(java.sql.Connection newDatabaseConnection)
- Sets the databaseConnection attribute value to newDatabaseConnection.
- Parameters:
newDatabaseConnection
- java.sql.Connection