Search in sources :

Example 1 with CommunityCommitProcessFactory

use of org.neo4j.kernel.impl.factory.CommunityCommitProcessFactory in project neo4j by neo4j.

the class NeoStoreDataSourceRule method getDataSource.

public NeoStoreDataSource getDataSource(File storeDir, FileSystemAbstraction fs, IdGeneratorFactory idGeneratorFactory, IdTypeConfigurationProvider idConfigurationProvider, PageCache pageCache, Config config, DatabaseHealth databaseHealth, LogService logService) {
    if (dataSource != null) {
        dataSource.stop();
        dataSource.shutdown();
    }
    StatementLocksFactory locksFactory = mock(StatementLocksFactory.class);
    StatementLocks statementLocks = mock(StatementLocks.class);
    Locks.Client locks = mock(Locks.Client.class);
    when(statementLocks.optimistic()).thenReturn(locks);
    when(statementLocks.pessimistic()).thenReturn(locks);
    when(locksFactory.newInstance()).thenReturn(statementLocks);
    JobScheduler jobScheduler = mock(JobScheduler.class, RETURNS_MOCKS);
    Monitors monitors = new Monitors();
    LabelScanStoreProvider labelScanStoreProvider = nativeLabelScanStoreProvider(storeDir, fs, pageCache, config, logService);
    SystemNanoClock clock = Clocks.nanoClock();
    dataSource = new NeoStoreDataSource(storeDir, config, idGeneratorFactory, IdReuseEligibility.ALWAYS, idConfigurationProvider, logService, mock(JobScheduler.class, RETURNS_MOCKS), mock(TokenNameLookup.class), dependencyResolverForNoIndexProvider(labelScanStoreProvider), mock(PropertyKeyTokenHolder.class), mock(LabelTokenHolder.class), mock(RelationshipTypeTokenHolder.class), locksFactory, mock(SchemaWriteGuard.class), mock(TransactionEventHandlers.class), IndexingService.NO_MONITOR, fs, mock(TransactionMonitor.class), databaseHealth, mock(PhysicalLogFile.Monitor.class), TransactionHeaderInformationFactory.DEFAULT, new StartupStatisticsProvider(), null, new CommunityCommitProcessFactory(), mock(InternalAutoIndexing.class), pageCache, new StandardConstraintSemantics(), monitors, new Tracers("null", NullLog.getInstance(), monitors, jobScheduler), mock(Procedures.class), IOLimiter.unlimited(), new AvailabilityGuard(clock, NullLog.getInstance()), clock, new CanWrite(), new StoreCopyCheckPointMutex());
    return dataSource;
}
Also used : JobScheduler(org.neo4j.kernel.impl.util.JobScheduler) LabelScanStoreProvider(org.neo4j.kernel.impl.api.scan.LabelScanStoreProvider) NeoStoreDataSource(org.neo4j.kernel.NeoStoreDataSource) Locks(org.neo4j.kernel.impl.locking.Locks) StatementLocks(org.neo4j.kernel.impl.locking.StatementLocks) AvailabilityGuard(org.neo4j.kernel.AvailabilityGuard) StartupStatisticsProvider(org.neo4j.kernel.impl.core.StartupStatisticsProvider) CanWrite(org.neo4j.kernel.impl.factory.CanWrite) SystemNanoClock(org.neo4j.time.SystemNanoClock) StatementLocksFactory(org.neo4j.kernel.impl.locking.StatementLocksFactory) StatementLocks(org.neo4j.kernel.impl.locking.StatementLocks) Monitors(org.neo4j.kernel.monitoring.Monitors) StoreCopyCheckPointMutex(org.neo4j.kernel.impl.transaction.log.checkpoint.StoreCopyCheckPointMutex) CommunityCommitProcessFactory(org.neo4j.kernel.impl.factory.CommunityCommitProcessFactory) StandardConstraintSemantics(org.neo4j.kernel.impl.constraints.StandardConstraintSemantics) PhysicalLogFile(org.neo4j.kernel.impl.transaction.log.PhysicalLogFile) Tracers(org.neo4j.kernel.monitoring.tracing.Tracers)

Aggregations

AvailabilityGuard (org.neo4j.kernel.AvailabilityGuard)1 NeoStoreDataSource (org.neo4j.kernel.NeoStoreDataSource)1 LabelScanStoreProvider (org.neo4j.kernel.impl.api.scan.LabelScanStoreProvider)1 StandardConstraintSemantics (org.neo4j.kernel.impl.constraints.StandardConstraintSemantics)1 StartupStatisticsProvider (org.neo4j.kernel.impl.core.StartupStatisticsProvider)1 CanWrite (org.neo4j.kernel.impl.factory.CanWrite)1 CommunityCommitProcessFactory (org.neo4j.kernel.impl.factory.CommunityCommitProcessFactory)1 Locks (org.neo4j.kernel.impl.locking.Locks)1 StatementLocks (org.neo4j.kernel.impl.locking.StatementLocks)1 StatementLocksFactory (org.neo4j.kernel.impl.locking.StatementLocksFactory)1 PhysicalLogFile (org.neo4j.kernel.impl.transaction.log.PhysicalLogFile)1 StoreCopyCheckPointMutex (org.neo4j.kernel.impl.transaction.log.checkpoint.StoreCopyCheckPointMutex)1 JobScheduler (org.neo4j.kernel.impl.util.JobScheduler)1 Monitors (org.neo4j.kernel.monitoring.Monitors)1 Tracers (org.neo4j.kernel.monitoring.tracing.Tracers)1 SystemNanoClock (org.neo4j.time.SystemNanoClock)1