public interface GraphAwareRuntime
RuntimeModules to perform useful work.
There must be exactly one instance of this runtime for a single GraphDatabaseService.
After all desired modules have been registered, start() can be called in order to initialize the runtime and
all its modules before the database is exposed to callers. No more modules can be registered thereafter.
If not called explicitly, the start() method shall be called automatically by the runtime upon first
transaction received from callers. In such case, all other transaction will be blocked until the runtime and all its
modules have been initialized.
Every new RuntimeModule whose configuration has changed since the last run will
be forced to (re-)initialize, which can lead to very long
startup times, as (re-)initialization could be a global graph operation. Re-initialization will also be automatically
performed for all modules, for which it has been detected that something is out-of-sync
(module threw a com.graphaware.runtime.module.NeedsInitializationException).
The runtime might use special nodes for internal data storage and prevent the deletion of those nodes.| Modifier and Type | Method and Description |
|---|---|
RuntimeConfiguration |
getConfiguration()
Get the configuration of this runtime.
|
DatabaseWriter |
getDatabaseWriter()
Get an instance of database writer associated with this runtime.
|
<T extends RuntimeModule> |
getModule(String moduleId,
Class<T> clazz)
Get a module registered with the runtime.
|
void |
registerModule(RuntimeModule module)
Register a
RuntimeModule. |
void |
start()
Start the Runtime.
|
void |
start(boolean skipLoadingMetadata)
Start the runtime, optionally skipping the metadata loading phase.
|
void |
waitUntilStarted()
Blocks until this runtime has been started and is ready to use.
|
void registerModule(RuntimeModule module)
RuntimeModule. Note that modules are delegated to in the order
they are registered. Must be called before the Runtime is started.module - to register.void start()
void waitUntilStarted()
<T extends RuntimeModule> T getModule(String moduleId, Class<T> clazz) throws org.neo4j.graphdb.NotFoundException
T - type of the class above.moduleId - module ID.clazz - expected class of the module.org.neo4j.graphdb.NotFoundException - in case no such module has been registered.RuntimeConfiguration getConfiguration()
void start(boolean skipLoadingMetadata)
skipLoadingMetadata - true for skipping the metadata loading phase.DatabaseWriter getDatabaseWriter()
Copyright © 2013–2015 Graph Aware Limited. All rights reserved.