|
Neo4j Community | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.neo4j.kernel.AbstractGraphDatabase
org.neo4j.kernel.EmbeddedReadOnlyGraphDatabase
public final class EmbeddedReadOnlyGraphDatabase
A read-only version of EmbeddedGraphDatabase.
| Constructor Summary | |
|---|---|
EmbeddedReadOnlyGraphDatabase(String storeDir)
Creates an embedded GraphDatabaseService with a store located in
storeDir. |
|
EmbeddedReadOnlyGraphDatabase(String storeDir,
Map<String,String> params)
A non-standard way of creating an embedded GraphDatabaseService
with a set of configuration parameters. |
|
| Method Summary | ||
|---|---|---|
protected void |
close()
|
|
Node |
createNode()
Creates a new node. |
|
Config |
getConfig()
Returns a non-standard configuration object. |
|
KernelData |
getKernelData()
|
|
|
getManagementBeans(Class<T> type)
|
|
Node |
getNodeById(long id)
Looks up a node by id. |
|
Node |
getReferenceNode()
Returns the reference node, which is a "starting point" in the node space. |
|
Relationship |
getRelationshipById(long id)
Looks up a relationship by id. |
|
IndexManager |
index()
Returns the IndexManager paired with this graph database service
and is the entry point for managing indexes coupled with this database. |
|
static Map<String,String> |
loadConfigurations(String file)
A non-standard convenience method that loads a standard property file and converts it into a generic Map. |
|
KernelEventHandler |
registerKernelEventHandler(KernelEventHandler handler)
Registers handler as a handler for kernel events which
are generated from different places in the lifecycle of the kernel. |
|
|
registerTransactionEventHandler(TransactionEventHandler<T> handler)
Registers handler as a handler for transaction events which
are generated from different places in the lifecycle of each
transaction. |
|
String |
toString()
|
|
TransactionBuilder |
tx()
Returns a new builder where some aspects of the behavior can be configured. |
|
KernelEventHandler |
unregisterKernelEventHandler(KernelEventHandler handler)
Unregisters handler from the list of kernel event handlers. |
|
|
unregisterTransactionEventHandler(TransactionEventHandler<T> handler)
Unregisters handler from the list of transaction event handlers. |
|
| Methods inherited from class org.neo4j.kernel.AbstractGraphDatabase |
|---|
beginTx, createStringLogger, getAllNodes, getManagementBean, getMessageLog, getRelationshipTypes, getSingleManagementBean, getStoreDir, isEphemeral, shutdown |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.neo4j.graphdb.GraphDatabaseService |
|---|
beginTx, getAllNodes, getRelationshipTypes, shutdown |
| Constructor Detail |
|---|
public EmbeddedReadOnlyGraphDatabase(String storeDir)
GraphDatabaseService with a store located in
storeDir. If the directory shouldn't exist or isn't a neo4j
store an exception will be thrown.
storeDir - the store directory for the Neo4j store files
public EmbeddedReadOnlyGraphDatabase(String storeDir,
Map<String,String> params)
GraphDatabaseService
with a set of configuration parameters. Will most likely be removed in
future releases.
Creates an embedded GraphDatabaseService with a store located in
storeDir. If the directory shouldn't exist or isn't a neo4j
store an exception will be thrown.
storeDir - the store directory for the db filesparams - configuration parameters| Method Detail |
|---|
public static Map<String,String> loadConfigurations(String file)
Map. Will most
likely be removed in future releases.
file - the property file to load
public Node createNode()
GraphDatabaseService
createNode in interface GraphDatabaseServicepublic Node getNodeById(long id)
GraphDatabaseService
getNodeById in interface GraphDatabaseServiceid - the id of the node
id if foundpublic Relationship getRelationshipById(long id)
GraphDatabaseService
getRelationshipById in interface GraphDatabaseServiceid - the id of the relationship
id if foundpublic Node getReferenceNode()
GraphDatabaseService
getReferenceNode in interface GraphDatabaseServiceprotected void close()
close in class AbstractGraphDatabasepublic TransactionBuilder tx()
AbstractGraphDatabaseTransactionBuilder.begin().
tx in class AbstractGraphDatabasepublic Config getConfig()
getConfig in class AbstractGraphDatabasepublic <T> Collection<T> getManagementBeans(Class<T> type)
getManagementBeans in class AbstractGraphDatabasepublic KernelData getKernelData()
getKernelData in class AbstractGraphDatabasepublic String toString()
toString in class AbstractGraphDatabasepublic KernelEventHandler registerKernelEventHandler(KernelEventHandler handler)
GraphDatabaseServicehandler as a handler for kernel events which
are generated from different places in the lifecycle of the kernel.
To guarantee proper behaviour the handler should be registered right
after the graph database has been started. If the specified handler
instance has already been registered this method will do nothing.
registerKernelEventHandler in interface GraphDatabaseServicehandler - the handler to receive events about different states
in the kernel lifecycle.
public <T> TransactionEventHandler<T> registerTransactionEventHandler(TransactionEventHandler<T> handler)
GraphDatabaseServicehandler as a handler for transaction events which
are generated from different places in the lifecycle of each
transaction. To guarantee that the handler gets all events properly
it shouldn't be registered when the application is running (i.e. in the
middle of one or more transactions). If the specified handler instance
has already been registered this method will do nothing.
registerTransactionEventHandler in interface GraphDatabaseServiceT - the type of state object used in the handler, see more
documentation about it at TransactionEventHandler.handler - the handler to receive events about different states
in transaction lifecycles.
public KernelEventHandler unregisterKernelEventHandler(KernelEventHandler handler)
GraphDatabaseServicehandler from the list of kernel event handlers.
If handler hasn't been registered with
GraphDatabaseService.registerKernelEventHandler(KernelEventHandler) prior to calling
this method an IllegalStateException will be thrown.
After a successful call to this method the handler will no
longer receive any kernel events.
unregisterKernelEventHandler in interface GraphDatabaseServicehandler - the handler to receive events about different states
in the kernel lifecycle.
public <T> TransactionEventHandler<T> unregisterTransactionEventHandler(TransactionEventHandler<T> handler)
GraphDatabaseServicehandler from the list of transaction event handlers.
If handler hasn't been registered with
GraphDatabaseService.registerTransactionEventHandler(TransactionEventHandler) prior
to calling this method an IllegalStateException will be thrown.
After a successful call to this method the handler will no
longer receive any transaction events.
unregisterTransactionEventHandler in interface GraphDatabaseServiceT - the type of state object used in the handler, see more
documentation about it at TransactionEventHandler.handler - the handler to receive events about different states
in transaction lifecycles.
public IndexManager index()
GraphDatabaseServiceIndexManager paired with this graph database service
and is the entry point for managing indexes coupled with this database.
index in interface GraphDatabaseServiceIndexManager for this database.
|
Neo4j Community | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||