use of org.neo4j.cypher.internal.DocsExecutionEngine in project neo4j-documentation by neo4j.
the class DocsExecutionEngineTest method createStuff.
private static DocsSetup createStuff() {
EphemeralFileSystemAbstraction fs = new EphemeralFileSystemAbstraction();
GraphDatabaseService graph = new TestEnterpriseGraphDatabaseFactory().setFileSystem(fs).newImpermanentDatabase();
GraphDatabaseCypherService database = new GraphDatabaseCypherService(graph);
GraphDatabaseCypherService queryService = new GraphDatabaseCypherService(graph);
GraphDatabaseAPI graphAPI = (GraphDatabaseAPI) graph;
DependencyResolver resolver = graphAPI.getDependencyResolver();
LogService logService = resolver.resolveDependency(LogService.class);
Monitors monitors = resolver.resolveDependency(Monitors.class);
LogProvider logProvider = logService.getInternalLogProvider();
CommunityCompatibilityFactory inner = new CommunityCompatibilityFactory(queryService, monitors, logProvider);
EnterpriseCompatibilityFactory compatibilityFactory = new EnterpriseCompatibilityFactory(inner, queryService, monitors, logProvider);
NullLogProvider logProvider1 = NullLogProvider.getInstance();
DocsExecutionEngine engine = new DocsExecutionEngine(database, logProvider1, compatibilityFactory);
PropertyContainerLocker locker = new PropertyContainerLocker();
TransactionalContextFactory contextFactory = Neo4jTransactionalContextFactory.create(database, locker);
return new DocsSetup() {
@Override
public GraphDatabaseCypherService database() {
return database;
}
@Override
public DocsExecutionEngine engine() {
return engine;
}
@Override
public TransactionalContextFactory contextFactory() {
return contextFactory;
}
};
}
Aggregations