public abstract class BaseGraphAwareRuntime extends Object implements GraphAwareRuntime, org.neo4j.graphdb.event.KernelEventHandler
GraphAwareRuntime implementations. Handles lifecycle of the runtime and basic
module-related sanity checks.| Modifier | Constructor and Description |
|---|---|
protected |
BaseGraphAwareRuntime(RuntimeConfiguration configuration)
Create a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterShutdown()
React to shutdown.
|
void |
beforeShutdown() |
protected abstract void |
checkNotAlreadyRegistered(RuntimeModule module)
Check that the given module isn't already registered with the runtime.
|
protected abstract void |
cleanupMetadata(Set<String> usedModules)
Perform cleanup of metadata potentially written to the graph by modules that aren't used any more.
|
protected abstract void |
doRegisterModule(RuntimeModule module)
Perform the actual module registration after sanity checks have passed.
|
RuntimeConfiguration |
getConfiguration() |
Object |
getResource() |
protected boolean |
isStarted(ImprovedTransactionData transactionData)
Checks to see if this
GraphAwareRuntime is started. |
void |
kernelPanic(org.neo4j.graphdb.event.ErrorState error) |
protected abstract Set<String> |
loadMetadata()
Load module metadata.
|
org.neo4j.graphdb.event.KernelEventHandler.ExecutionOrder |
orderComparedTo(org.neo4j.graphdb.event.KernelEventHandler other) |
void |
registerModule(RuntimeModule module) |
protected abstract void |
shutdownModules()
Shutdown all modules.
|
void |
start() |
protected void |
startModules()
Perform the actual start of the runtime, being certain that it is the right time to do so.
|
void |
waitUntilStarted() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDatabaseWriter, getModule, getModuleprotected BaseGraphAwareRuntime(RuntimeConfiguration configuration)
configuration - config.public RuntimeConfiguration getConfiguration()
getConfiguration in interface GraphAwareRuntimepublic final void registerModule(RuntimeModule module)
registerModule in interface GraphAwareRuntimeprotected abstract void checkNotAlreadyRegistered(RuntimeModule module)
module - to check.IllegalStateException - in case the module is already registered.protected abstract void doRegisterModule(RuntimeModule module)
module - to register.public final void start()
start in interface GraphAwareRuntimeprotected void startModules()
protected abstract Set<String> loadMetadata()
protected abstract void cleanupMetadata(Set<String> usedModules)
usedModules - IDs of all the used modules (should be the same as returned by loadMetadata().public final void waitUntilStarted()
waitUntilStarted in interface GraphAwareRuntimeprotected final boolean isStarted(ImprovedTransactionData transactionData)
GraphAwareRuntime is started. Blocks until it is started, unless one of the following
conditions is met:
truefalsefalsetrue iff the runtime is started.
false iff the runtime isn't started but it is safe to proceed.IllegalStateException - in case the runtime hasn't been started at all.public final void beforeShutdown()
beforeShutdown in interface org.neo4j.graphdb.event.KernelEventHandlerprotected void afterShutdown()
protected abstract void shutdownModules()
public final void kernelPanic(org.neo4j.graphdb.event.ErrorState error)
kernelPanic in interface org.neo4j.graphdb.event.KernelEventHandlerpublic final Object getResource()
getResource in interface org.neo4j.graphdb.event.KernelEventHandlerpublic final org.neo4j.graphdb.event.KernelEventHandler.ExecutionOrder orderComparedTo(org.neo4j.graphdb.event.KernelEventHandler other)
orderComparedTo in interface org.neo4j.graphdb.event.KernelEventHandlerCopyright © 2013-2016–2018 Graph Aware Limited. All rights reserved.