org.neo4j.server.preflight
Class PreFlightTasks
java.lang.Object
org.neo4j.server.preflight.PreFlightTasks
public class PreFlightTasks
- extends Object
These are tasks that are run on server startup that may take a long time
to execute, such as recovery, upgrades and so on.
This implementation still needs some work, because of some of the refactoring
done regarding the NeoServer. Specifically, some of these tasks verify that
properties files exist and are valid. Other preflight tasks we might want to
add could be auto-generating config files if they don't exist and creating required
directories.
All of these (including auto-generating neo4j.properties and creating directories)
except validating and potentially generating neo4j-server.properties depend on having
the server configuration available. Eg. we can't both ensure that file exists within these
tests, while at the same time depending on that file existing.
The validation is not a problem, because we will refactor the server config to use the
new configuration system from the kernel, which automatically validates itself.
Ensuring the config file exists (and potentially auto-generating it) is a problem.
Either this need to be split into tasks that have dependencies, and tasks that don't.
Although, it seems it is only this one edge case, so perhaps accepting that and adding
code to the bootstrapper to ensure the config file exists is acceptable.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PreFlightTasks
public PreFlightTasks(org.neo4j.kernel.logging.Logging logging,
PreflightTask... tasks)
run
public boolean run()
failedTask
public PreflightTask failedTask()
Copyright © 2002-2014 The Neo4j Graph Database Project. All Rights Reserved.