|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.e4graph.Storage
Field Summary | |
static int |
AUTOCOMMIT
AUTOCOMMIT may be set in the state of a Storage, meaning that the storage is auto-committed from time to time by the e4Graph runtime system (off by default). |
static int |
AUTOGC
AUTOGC may be set in the state of a Storage, meaning that the e4Graph runtime performs GCs on this storage as needed (on by default). |
static int |
BIGPREALLOC
BIGPREALLOC may be set in the state of a Storage, meaning that big areas are pre-allocated to hold newly created nodes and vertices (off by default). |
static int |
COMMITATCLOSE
COMMITATCLOSE may be set in the state of a Storage, meaning that the storage should be committed when closed (on by default). |
static int |
COMPACTATCLOSE
COMPACTATCLOSE may be set in the state of a Storage, meaning that the storag is compacted to its smallest possible on-disk size when it is closed (off by default). |
static int |
DEFAULTSTATE
DEFAULTSTATE denotes the default state of a Storage, consisting of COMMITATCLOSE, OPENGC and AUTOGC. |
static int |
GCBEFORECOMMIT
GCBEFORECOMMIT may be set in the state of a Storage, meaning that a GC is performed on this storage before it is committed (off by default). |
static int |
INVALID
This value represents the storageIndex of an invalid storage. |
static java.lang.String |
METAKIT
This is the name of the default driver to use to manage the persistence of this storage. |
static int |
OPENGC
OPENGC may be set in the state of a Storage, meaning that a GC should be performed (as necessary) when the storage is opened (on by default). |
Constructor Summary | |
Storage()
Default constructor, constructs an invalid storage. |
|
Storage(java.lang.String name,
java.lang.String driver)
Constructor that uses the given name and driver to construct a storage. |
|
Storage(java.lang.String name,
java.lang.String driver,
int configuration)
Constructor that in addition to a name and driver for the storage also accepts an initial configuration state. |
Method Summary | |
void |
close()
Close the storage, potentially committing any unsaved changes. |
boolean |
commit()
Commit any unsaved changes in this storage to persistent storage. |
boolean |
copyTo(com.e4graph.Storage otherStorage,
boolean forceCommit)
Copy the contents of this storage (including any uncommitted changes) to the other storage, and if forceCommit is true, force a commit action on the other storage after the copy. |
boolean |
delete()
Delete the persistent form of this storage. |
void |
doGC()
Do a garbage collection on this storage now. |
java.lang.String |
driver()
Retrieve the String for the driver used to manage persistence for this storage. |
boolean |
equals(com.e4graph.Storage otherStorage)
Two storages are equal if their storageIndex values are the same. |
int |
getGeneration()
Retrieve the generation index for this storage. |
int |
getIndex()
Retrieve the storageIndex for this storage. |
com.e4graph.Node |
getNode()
Create a new detached node in this storage and return the Node object representing it. |
com.e4graph.Node |
getRoot()
Retrieve a Node representing the currently designated root node of this storage. |
int |
getState()
Retrieve the current storage state. |
static com.e4graph.Storage |
getStorage(int index,
int generation)
Retrieves a Storage object for a currently open storage, given its storageIndex. |
int |
getStorageIndex()
Retrieve the storageIndex for this storage. |
static com.e4graph.StorageIterator |
getStorageIterator()
Create an iterator that iterates over all storages that are accessible in Java. |
com.e4graph.Vertex |
getVertex(java.lang.String name,
byte[] bytes)
Create a new detached vertex with the given name and the binary value bytes, and return the Vertex object representing it. |
com.e4graph.Vertex |
getVertex(java.lang.String name,
double d)
Create a new detached vertex with the given name and the double value d, and return the Vertex object representing it. |
com.e4graph.Vertex |
getVertex(java.lang.String name,
int i)
Create a new detached vertex with the given name and integer value i, and return the Vertex object representing it. |
com.e4graph.Vertex |
getVertex(java.lang.String name,
com.e4graph.Node n)
|
com.e4graph.Vertex |
getVertex(java.lang.String name,
java.lang.String s)
Create a new detached vertex with the given name and the string value s, and return the Vertex object representing it. |
boolean |
isDirty()
Are there uncommitted changes in this storage? |
boolean |
isValid()
A storage is valid if the underlying e4Graph storage is valid and its storageIndex is not the constant INVALID. |
void |
markDirty()
Mark this storage as having uncommitted changes that have not yet been saved to persistent storage. |
java.lang.String |
name()
Retrieve the String name of this storage. |
boolean |
needsGC()
Is a garbage collection needed for this storage (it is needed if there may be detached nodes and vertices which are not referenced by the user program). |
boolean |
setRoot(com.e4graph.Node newRoot)
Set the currently designated root node of this storage to the e4Graph node denoted by the given newRoot. |
int |
setState(int statemask)
Set the storage state to a new state, with changes taking effect immediately and affecting subsequent behavior. |
static java.lang.String |
version()
Retrieves the version string for the e4Graph library in use. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int COMMITATCLOSE
public static final int AUTOCOMMIT
public static final int OPENGC
public static final int GCBEFORECOMMIT
public static final int AUTOGC
public static final int BIGPREALLOC
public static final int COMPACTATCLOSE
public static final int DEFAULTSTATE
public static final int INVALID
public static final java.lang.String METAKIT
Constructor Detail |
public Storage()
public Storage(java.lang.String name, java.lang.String driver)
public Storage(java.lang.String name, java.lang.String driver, int configuration)
Method Detail |
public static com.e4graph.StorageIterator getStorageIterator()
public static com.e4graph.Storage getStorage(int index, int generation) throws StorageIsNotOpenException
StorageIsNotOpenException
public int getIndex()
public int getStorageIndex()
public int getGeneration()
public static java.lang.String version()
public boolean isValid()
public boolean equals(com.e4graph.Storage otherStorage)
public int setState(int statemask)
public int getState()
public boolean commit()
public void close()
public boolean copyTo(com.e4graph.Storage otherStorage, boolean forceCommit)
public boolean delete()
public com.e4graph.Node getRoot()
public boolean setRoot(com.e4graph.Node newRoot)
public boolean isDirty()
public void markDirty()
public java.lang.String name()
public java.lang.String driver()
public com.e4graph.Node getNode()
public com.e4graph.Vertex getVertex(java.lang.String name, com.e4graph.Node n)
public com.e4graph.Vertex getVertex(java.lang.String name, int i)
public com.e4graph.Vertex getVertex(java.lang.String name, double d)
public com.e4graph.Vertex getVertex(java.lang.String name, java.lang.String s)
public com.e4graph.Vertex getVertex(java.lang.String name, byte[] bytes)
public void doGC()
public boolean needsGC()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |