org.wamblee.test.persistence
Interface Database

All Known Implementing Classes:
AbstractDatabase, DerbyDatabase, ExternalDatabase

public interface Database

Represents a database.

Author:
Erik Brakkee

Method Summary
 int getActiveConnections()
          Gets the number of active connections from the pool.
 java.lang.String getExternalJdbcUrl()
          Gets the external Jdbc URL to connect to this database from other JVMs.
 java.lang.String getJdbcUrl()
          Gets the Jdbc Url to connect to this database.
 java.lang.String getPassword()
          Gets the password to connect to the database.
 java.lang.String getUsername()
          Gets the username to connect to the database.
 javax.sql.DataSource start()
          Starts a database.
 void stop()
          Stops a database.
 

Method Detail

start

javax.sql.DataSource start()
Starts a database. This call should not block and return as soon as the database has been started.


getActiveConnections

int getActiveConnections()
Gets the number of active connections from the pool. This is useful for determining resource leaks.

Returns:
Active connections.

getJdbcUrl

java.lang.String getJdbcUrl()
Gets the Jdbc Url to connect to this database.

Returns:
Jdbc Url.

getExternalJdbcUrl

java.lang.String getExternalJdbcUrl()
Gets the external Jdbc URL to connect to this database from other JVMs.


getUsername

java.lang.String getUsername()
Gets the username to connect to the database.

Returns:
username.

getPassword

java.lang.String getPassword()
Gets the password to connect to the database.

Returns:
password.

stop

void stop()
Stops a database.



Copyright © 2010. All Rights Reserved.