|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.netarkivet.archive.arcrepositoryadmin.ArchiveDBConnection
public final class ArchiveDBConnection
This class handles connections to the Archive database The statements to create the tables are in scripts/sql/createBitpreservationDB.sql The implementation relies on a connection pool. Once acquired through the get() method, a connection must be explicitly returned to the pool by calling the release(Connection) method. THis class is intended to be used statically, and hence cannot be instantiated and is final.
Method Summary | |
---|---|
static void |
cleanup()
Closes the underlying data source. |
static java.sql.Connection |
get()
Get a connection to the harvest definition database from the pool. |
static java.lang.String |
getArchiveUrl()
Method for retrieving the url for the archive database. |
static void |
release(java.sql.Connection connection)
Helper method to return a connection to the pool. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.sql.Connection get()
ArchiveSettings.DB_POOL_MIN_SIZE
ArchiveSettings.DB_POOL_MAX_SIZE
ArchiveSettings.DB_POOL_ACQ_INC
release(Connection)
.
IOFailure
- if we cannot connect to the database (or find the
driver).public static void cleanup()
public static void release(java.sql.Connection connection)
connection
- a connectionpublic static java.lang.String getArchiveUrl()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |