com.continuent.tungsten.common.cluster.resource
Class DatabaseConnection

java.lang.Object
  extended by com.continuent.tungsten.common.cluster.resource.DatabaseConnection

public class DatabaseConnection
extends java.lang.Object


Nested Class Summary
static class DatabaseConnection.ConnectionType
           
 
Constructor Summary
DatabaseConnection(DatabaseConnection.ConnectionType type, java.lang.String name, java.sql.Connection connection, DataSource ds, java.lang.Object context)
           
 
Method Summary
 java.sql.Connection getConnection()
           
 java.lang.Object getContext()
           
 DataSource getDs()
           
 java.util.Date getLastUsed()
          Returns the lastUsed value.
 java.lang.String getName()
           
 Sequence getSequence()
           
 DatabaseConnection.ConnectionType getType()
           
 boolean isClosed()
           
 void setContext(java.lang.Object context)
           
 void setName(java.lang.String name)
           
 void setSequence(Sequence sequence)
           
 void setType(DatabaseConnection.ConnectionType type)
           
 java.lang.String toString()
           
 java.lang.String toString(boolean detailed)
           
 void touch()
          Updates the lastUsed value to the current Date/Time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DatabaseConnection

public DatabaseConnection(DatabaseConnection.ConnectionType type,
                          java.lang.String name,
                          java.sql.Connection connection,
                          DataSource ds,
                          java.lang.Object context)
Method Detail

getType

public DatabaseConnection.ConnectionType getType()

setType

public void setType(DatabaseConnection.ConnectionType type)

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

getConnection

public java.sql.Connection getConnection()

getContext

public java.lang.Object getContext()

setContext

public void setContext(java.lang.Object context)

getSequence

public Sequence getSequence()

setSequence

public void setSequence(Sequence sequence)

getDs

public DataSource getDs()

getLastUsed

public java.util.Date getLastUsed()
Returns the lastUsed value.

Returns:
Returns the lastUsed.

touch

public void touch()
Updates the lastUsed value to the current Date/Time.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toString

public java.lang.String toString(boolean detailed)

isClosed

public boolean isClosed()
                 throws java.sql.SQLException
Throws:
java.sql.SQLException