Search in sources :

Example 1 with BoltGraphDatabaseServiceSPI

use of org.neo4j.bolt.dbapi.BoltGraphDatabaseServiceSPI in project neo4j by neo4j.

the class DefaultDatabaseTransactionStateMachineSPIProviderTest method newSpiProvider.

private TransactionStateMachineSPIProvider newSpiProvider(DatabaseManagementService managementService) {
    var clock = mock(SystemNanoClock.class);
    var dbProvider = new BoltKernelDatabaseManagementServiceProvider(managementService, new Monitors(), clock, Duration.ZERO);
    return new AbstractTransactionStatementSPIProvider(dbProvider, mockBoltChannel, clock, mock(MemoryTracker.class, RETURNS_MOCKS)) {

        @Override
        protected TransactionStateMachineSPI newTransactionStateMachineSPI(BoltGraphDatabaseServiceSPI activeBoltGraphDatabaseServiceSPI, StatementProcessorReleaseManager resourceReleaseManger) {
            return mock(TransactionStateMachineSPI.class);
        }

        @Override
        public void releaseTransactionStateMachineSPI() {
        }
    };
}
Also used : StatementProcessorReleaseManager(org.neo4j.bolt.runtime.statemachine.StatementProcessorReleaseManager) BoltKernelDatabaseManagementServiceProvider(org.neo4j.bolt.dbapi.impl.BoltKernelDatabaseManagementServiceProvider) Monitors(org.neo4j.monitoring.Monitors) BoltGraphDatabaseServiceSPI(org.neo4j.bolt.dbapi.BoltGraphDatabaseServiceSPI) MemoryTracker(org.neo4j.memory.MemoryTracker)

Aggregations

BoltGraphDatabaseServiceSPI (org.neo4j.bolt.dbapi.BoltGraphDatabaseServiceSPI)1 BoltKernelDatabaseManagementServiceProvider (org.neo4j.bolt.dbapi.impl.BoltKernelDatabaseManagementServiceProvider)1 StatementProcessorReleaseManager (org.neo4j.bolt.runtime.statemachine.StatementProcessorReleaseManager)1 MemoryTracker (org.neo4j.memory.MemoryTracker)1 Monitors (org.neo4j.monitoring.Monitors)1