Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.common.instance.orient.storage
Class DatabaseHandle

java.lang.Object
  extended by eu.esdihumboldt.hale.common.instance.orient.storage.DatabaseHandle

public class DatabaseHandle
extends Object

Database handle that manages objects referencing the database object. It will release the connection when all those objects have been garbage collected.

Author:
Simon Templer

Constructor Summary
DatabaseHandle(com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx database)
          Create a database handle
 
Method Summary
 void addReference(Object object)
          Add an object that references the database connection
 com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx getDatabase()
           
 void tryClose()
          Try closing the database connection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatabaseHandle

public DatabaseHandle(com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx database)
Create a database handle

Parameters:
database - the database connection
Method Detail

addReference

public void addReference(Object object)
Add an object that references the database connection

Parameters:
object - the object referencing the database

tryClose

public void tryClose()
Try closing the database connection


getDatabase

public com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx getDatabase()
Returns:
the database

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d