public class ProductionRuntime extends DatabaseRuntime
DatabaseRuntime intended for production use.
Supports both TimerDrivenModule and TxDrivenModule RuntimeModules.
To use this GraphAwareRuntime, please construct it using GraphAwareRuntimeFactory.
| Modifier | Constructor and Description |
|---|---|
protected |
ProductionRuntime(RuntimeConfiguration configuration,
org.neo4j.graphdb.GraphDatabaseService database,
TxDrivenModuleManager<TxDrivenModule> txDrivenModuleManager,
TimerDrivenModuleManager timerDrivenModuleManager,
Neo4jWriter writer)
Construct a new runtime.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterShutdown(org.neo4j.graphdb.GraphDatabaseService database)
React to shutdown.
|
protected void |
checkNotAlreadyRegistered(RuntimeModule module)
Check that the given module isn't already registered with the runtime.
|
protected void |
cleanupMetadata(Set<String> usedModules)
Perform cleanup of metadata potentially written to the graph by modules that aren't used any more.
|
protected void |
doRegisterModule(RuntimeModule module)
Perform the actual module registration after sanity checks have passed.
|
<M extends RuntimeModule> |
getModule(Class<M> clazz) |
<M extends RuntimeModule> |
getModule(String moduleId,
Class<M> clazz) |
protected Set<String> |
loadMetadata()
Load module metadata.
|
protected void |
shutdownModules()
Shutdown all modules.
|
protected void |
startModules()
Perform the actual start of the runtime, being certain that it is the right time to do so.
|
afterShutdown, getDatabaseWriter, getTxDrivenModuleManagerafterCommit, afterRollback, beforeCommitbeforeShutdown, getConfiguration, getResource, isStarted, kernelPanic, orderComparedTo, registerModule, start, waitUntilStartedprotected ProductionRuntime(RuntimeConfiguration configuration, org.neo4j.graphdb.GraphDatabaseService database, TxDrivenModuleManager<TxDrivenModule> txDrivenModuleManager, TimerDrivenModuleManager timerDrivenModuleManager, Neo4jWriter writer)
GraphAwareRuntimeFactory.configuration - config.database - on which the runtime operates.txDrivenModuleManager - manager for transaction-driven modules.timerDrivenModuleManager - manager for timer-driven modules.writer - to use when writing to the database.protected void startModules()
startModules in class TxDrivenRuntime<TxDrivenModule>protected Set<String> loadMetadata()
loadMetadata in class TxDrivenRuntime<TxDrivenModule>protected void cleanupMetadata(Set<String> usedModules)
cleanupMetadata in class TxDrivenRuntime<TxDrivenModule>usedModules - IDs of all the used modules (should be the same as returned by BaseGraphAwareRuntime.loadMetadata().protected void checkNotAlreadyRegistered(RuntimeModule module)
checkNotAlreadyRegistered in class TxDrivenRuntime<TxDrivenModule>module - to check.protected void doRegisterModule(RuntimeModule module)
doRegisterModule in class DatabaseRuntimemodule - to register.public <M extends RuntimeModule> M getModule(String moduleId, Class<M> clazz) throws org.neo4j.graphdb.NotFoundException
getModule in interface GraphAwareRuntimegetModule in class TxDrivenRuntime<TxDrivenModule>org.neo4j.graphdb.NotFoundExceptionpublic <M extends RuntimeModule> M getModule(Class<M> clazz) throws org.neo4j.graphdb.NotFoundException
getModule in interface GraphAwareRuntimegetModule in class TxDrivenRuntime<TxDrivenModule>org.neo4j.graphdb.NotFoundExceptionprotected void shutdownModules()
shutdownModules in class TxDrivenRuntime<TxDrivenModule>protected void afterShutdown(org.neo4j.graphdb.GraphDatabaseService database)
afterShutdown in class DatabaseRuntimedatabase - which has been shut down.Copyright © 2013-2016–2018 Graph Aware Limited. All rights reserved.