|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hypergraphdb.HGEnvironment
public class HGEnvironment
This class provides some facilities to manage several open HyperGraph databases within a single virtual machine. This is useful when one needs to access a currently open database by its location.
The class essentially implements a static map of currently open databases. The
general name HGEnvironment reflects the intent to eventually
put JVM-wide operations here.
| Constructor Summary | |
|---|---|
HGEnvironment()
|
|
| Method Summary | |
|---|---|
static void |
configure(java.lang.String location,
HGConfiguration config)
Configure a HyperGraphDB instance before it is actually opened. |
static boolean |
exists(java.lang.String location)
Return true if there is a HyperGraph database at the given location
and false otherwise. |
static HyperGraph |
get(java.lang.String location)
Retrieve an already opened or open a HyperGraph instance. |
static HyperGraph |
get(java.lang.String location,
HGConfiguration config)
Retrieve the HyperGraphDB instance at the specified location and open it (if not already opened) with the given configuration. |
static HGConfiguration |
getConfiguration(java.lang.String location)
Retrieve the configuration of a HyperGraphDB instance. |
static HyperGraph |
getExistingOnly(java.lang.String location)
Same as get, but will return null if there is
no database at that location. |
static boolean |
isOpen(java.lang.String location)
Return true if the database at the given location is already
open and false otherwise. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HGEnvironment()
| Method Detail |
|---|
public static HyperGraph get(java.lang.String location)
Retrieve an already opened or open a HyperGraph instance. Note that a new
database instance will potentially be created via new HyperGraph(location)
if it doesn't already exist.
location - The location of the HyperGraph instance.
public static HyperGraph get(java.lang.String location,
HGConfiguration config)
Retrieve the HyperGraphDB instance at the specified location and open it (if not already opened) with the given configuration. If the instance has already been opened, the configuration parameter is ignored.
location - The filesystem path of the database instance.config - The set of configuration parameters.
public static HyperGraph getExistingOnly(java.lang.String location)
Same as get, but will return null if there is
no database at that location.
public static boolean exists(java.lang.String location)
Return true if there is a HyperGraph database at the given location
and false otherwise.
public static boolean isOpen(java.lang.String location)
Return true if the database at the given location is already
open and false otherwise.
public static void configure(java.lang.String location,
HGConfiguration config)
Configure a HyperGraphDB instance before it is actually opened. If the instance at that location is already opened, the new configuration will only take effect if you close and re-open the instance.
location - The filesystem path to the database instance.config - A HGConfiguration with the desired parameters set.public static HGConfiguration getConfiguration(java.lang.String location)
Retrieve the configuration of a HyperGraphDB instance. If no configuration was previously defined, a new one will be created.
location - The filesystem path to the HyperGraphDB instance.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||