use of org.neo4j.kernel.impl.storemigration.StoreVersionCheck.Result in project neo4j by neo4j.
the class UpgradableDatabase method hasCurrentVersion.
public boolean hasCurrentVersion(File storeDir) {
File neoStore = new File(storeDir, MetaDataStore.DEFAULT_NAME);
Result result = storeVersionCheck.hasVersion(neoStore, format.storeVersion());
switch(result.outcome) {
case ok:
case // let's assume the db is empty
missingStoreFile:
return true;
case storeVersionNotFound:
case unexpectedStoreVersion:
case attemptedStoreDowngrade:
return false;
default:
throw new IllegalArgumentException("Unknown outcome: " + result.outcome.name());
}
}
Aggregations