use of org.neo4j.graphdb.DependencyResolver in project neo4j by neo4j.
the class Start method createTransactionContext.
private TransactionalContext createTransactionContext(String queryText, Map<String, Object> queryParameters, Session session) {
DependencyResolver dependencyResolver = getDependencyResolver();
GraphDatabaseQueryService graph = dependencyResolver.resolveDependency(GraphDatabaseQueryService.class);
TransactionalContextFactory contextFactory = Neo4jTransactionalContextFactory.create(graph, new PropertyContainerLocker());
InternalTransaction transaction = graph.beginTransaction(KernelTransaction.Type.implicit, SecurityContext.AUTH_DISABLED);
return contextFactory.newContext(new ShellConnectionInfo(session.getId()), transaction, queryText, queryParameters);
}
use of org.neo4j.graphdb.DependencyResolver in project neo4j by neo4j.
the class CommunityCypherEngineProvider method createEngine.
@Override
protected QueryExecutionEngine createEngine(Dependencies deps, GraphDatabaseAPI graphAPI) {
GraphDatabaseCypherService queryService = new GraphDatabaseCypherService(graphAPI);
deps.satisfyDependency(queryService);
DependencyResolver resolver = graphAPI.getDependencyResolver();
LogService logService = resolver.resolveDependency(LogService.class);
KernelAPI kernelAPI = resolver.resolveDependency(KernelAPI.class);
Monitors monitors = resolver.resolveDependency(Monitors.class);
LogProvider logProvider = logService.getInternalLogProvider();
CommunityCompatibilityFactory compatibilityFactory = new CommunityCompatibilityFactory(queryService, kernelAPI, monitors, logProvider);
deps.satisfyDependencies(compatibilityFactory);
return new ExecutionEngine(queryService, logProvider, compatibilityFactory);
}
use of org.neo4j.graphdb.DependencyResolver in project neo4j by neo4j.
the class IndexStatisticsTest method before.
@Before
public void before() {
GraphDatabaseAPI graphDatabaseAPI = dbRule.getGraphDatabaseAPI();
this.db = graphDatabaseAPI;
DependencyResolver dependencyResolver = graphDatabaseAPI.getDependencyResolver();
this.bridge = dependencyResolver.resolveDependency(ThreadToStatementContextBridge.class);
graphDatabaseAPI.getDependencyResolver().resolveDependency(Monitors.class).addMonitorListener(indexOnlineMonitor);
}
use of org.neo4j.graphdb.DependencyResolver in project neo4j by neo4j.
the class StorageLayerRelTypesAndDegreeTest method resolveNeoStores.
private NeoStores resolveNeoStores() {
DependencyResolver resolver = db.getDependencyResolver();
RecordStorageEngine storageEngine = resolver.resolveDependency(RecordStorageEngine.class);
return storageEngine.testAccessNeoStores();
}
use of org.neo4j.graphdb.DependencyResolver in project neo4j by neo4j.
the class StorageLayerTest method before.
@SuppressWarnings("deprecation")
@Before
public void before() {
db = (GraphDatabaseAPI) createGraphDatabase();
DependencyResolver resolver = db.getDependencyResolver();
this.disk = resolver.resolveDependency(StorageEngine.class).storeReadLayer();
this.state = new KernelStatement(null, null, disk.newStatement(), new Procedures(), new CanWrite(), LockTracer.NONE);
}
Aggregations