|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.metamatrix.common.connection.ManagedConnection
public abstract class ManagedConnection
| Nested Class Summary | |
|---|---|
static class |
ManagedConnection.ConnectionStatistics
|
| Field Summary | |
|---|---|
static java.lang.String |
DATABASE
The environment property name for the database name. |
static java.lang.String |
DRIVER
The environment property name for the class of the driver. |
static java.lang.String |
PASSWORD
The environment property name for the password that is to be used for connecting to the metadata store. |
static java.lang.String |
PROTOCOL
The environment property name for the protocol that is to be used. |
static java.lang.String |
USERNAME
The environment property name for the username that is to be used for connecting to the metadata store. |
| Constructor Summary | |
|---|---|
protected |
ManagedConnection(java.util.Properties env)
Create a new instance of a metadata connection. |
| Method Summary | |
|---|---|
void |
close()
This method is invoked by the pool to notify the specialized class that the connection is to be terminated. |
protected abstract void |
closeConnection()
This method is invoked by the pool to notify the specialized class that the connection is to be terminated. |
void |
commit()
Make all changes made since the previous commit/rollback permanent, and release any data source locks currently held by the Connection. |
protected void |
finalize()
|
java.util.Properties |
getEnvironment()
Obtain the environment properties for this metadata connection. |
ManagedConnection.ConnectionStatistics |
getStats()
|
java.lang.String |
getUserName()
Returns the name of the user using this managed connection |
void |
open()
This method is invoked by the pool to notify the specialized class that the connection is to be established. |
protected abstract void |
openConnection()
This method is invoked by the pool to notify the specialized class that the connection is to be established. |
protected abstract void |
performCommit()
Make all changes made since the previous commit/rollback permanent, and release any data source locks currently held by the Connection. |
protected abstract void |
performRollback()
Make all changes made since the previous commit/rollback permanent, and release any data source locks currently held by the Connection. |
protected abstract void |
prepareForRead()
Prepare this connection for read-only transactions. |
protected abstract void |
prepareForWrite()
Prepare this connection for write transactions. |
void |
rollback()
Make all changes made since the previous commit/rollback permanent, and release any data source locks currently held by the Connection. |
void |
setForRead()
Prepare this connection for read-only transactions. |
void |
setForWrite()
Prepare this connection for write transactions. |
protected void |
setUserName(java.lang.String userName)
This is a new method added as part of the ResourcePooling framework. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DRIVER
public static final java.lang.String PROTOCOL
public static final java.lang.String DATABASE
public static final java.lang.String USERNAME
public static final java.lang.String PASSWORD
| Constructor Detail |
|---|
protected ManagedConnection(java.util.Properties env)
context - the metadata context for the connection.env - the environment properties for the new connection.| Method Detail |
|---|
protected void finalize()
finalize in class java.lang.Objectprotected void setUserName(java.lang.String userName)
public java.lang.String getUserName()
public final java.util.Properties getEnvironment()
public final void open()
throws ManagedConnectionException
ManagedConnectionException - if there is an error establishing the connection.
public final void close()
throws ManagedConnectionException
ManagedConnectionException - if there is an error terminating the connection.
protected abstract void openConnection()
throws ManagedConnectionException
ManagedConnectionException - if there is an error establishing the connection.
protected abstract void closeConnection()
throws ManagedConnectionException
ManagedConnectionException - if there is an error terminating the connection.
public final void setForRead()
throws ManagedConnectionException
ManagedConnectionException - if an error occurred within or during communication with this connection.
public final void setForWrite()
throws ManagedConnectionException
ManagedConnectionException - if an error occurred within or during communication with this connection.
protected abstract void prepareForRead()
throws ManagedConnectionException
ManagedConnectionException - if an error occurred within or during communication with this connection.
protected abstract void prepareForWrite()
throws ManagedConnectionException
ManagedConnectionException - if an error occurred within or during communication with this connection.
public final void commit()
throws ManagedConnectionException
ManagedConnectionException - if an error occurred within or during communication with this connection.
public final void rollback()
throws ManagedConnectionException
ManagedConnectionException - if an error occurred within or during communication with this connection.
protected abstract void performCommit()
throws ManagedConnectionException
ManagedConnectionException - if an error occurred within or during communication with this connection.
protected abstract void performRollback()
throws ManagedConnectionException
ManagedConnectionException - if an error occurred within or during communication with this connection.public final ManagedConnection.ConnectionStatistics getStats()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||