use of org.neo4j.configuration.Config.defaults in project neo4j by neo4j.
the class RecoveryIT method idGeneratorIsDirty.
private boolean idGeneratorIsDirty(Path path, IdType idType) throws IOException {
DefaultIdGeneratorFactory idGeneratorFactory = new DefaultIdGeneratorFactory(fileSystem, immediate(), "my db");
try (IdGenerator idGenerator = idGeneratorFactory.open(pageCache, path, idType, () -> 0L, /*will not be used*/
10_000, readOnly(), Config.defaults(), NULL, Sets.immutable.empty())) {
MutableBoolean dirtyOnStartup = new MutableBoolean();
InvocationHandler invocationHandler = (proxy, method, args) -> {
if (method.getName().equals("dirtyOnStartup")) {
dirtyOnStartup.setTrue();
}
return null;
};
ReporterFactory reporterFactory = new ReporterFactory(invocationHandler);
idGenerator.consistencyCheck(reporterFactory, NULL);
return dirtyOnStartup.booleanValue();
}
}
Aggregations