Humboldt Alignment Editor 2.5.0

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

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

public class LocalOrientDB
extends Object

Represents a local Orient database

Author:
Simon Templer

Constructor Summary
LocalOrientDB(File location)
          Create a local Orient database.
 
Method Summary
 void clear()
          Delete the database and recreate it.
 void delete()
          Delete the database.
 DatabaseReference<com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx> openRead()
          Get a database reference with read access.

NOTE: Getting the database reference locks a read lock on the database.
 DatabaseReference<com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx> openWrite()
          Get a database reference with write access.

NOTE: Getting the database reference locks a write lock on the database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalOrientDB

public LocalOrientDB(File location)
Create a local Orient database. It will delete database that exists previously at the same location.

Parameters:
location - the data base location
Method Detail

openRead

public DatabaseReference<com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx> openRead()
Get a database reference with read access.

NOTE: Getting the database reference locks a read lock on the database. DatabaseReference.dispose() must be called when the database reference isn't needed any more.

Returns:
the database reference

openWrite

public DatabaseReference<com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx> openWrite()
Get a database reference with write access.

NOTE: Getting the database reference locks a write lock on the database. DatabaseReference.dispose() must be called when the database reference isn't needed any more.

Returns:
the database reference

clear

public void clear()
Delete the database and recreate it.


delete

public void delete()
Delete the database.


Humboldt Alignment Editor 2.5.0

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