Search in sources :

Example 1 with CentralJobScheduler

use of org.neo4j.kernel.impl.scheduler.CentralJobScheduler in project neo4j by neo4j.

the class NonUniqueIndexTest method createJobScheduler.

private static CentralJobScheduler createJobScheduler() {
    CentralJobScheduler scheduler = newSlowJobScheduler();
    scheduler.init();
    return scheduler;
}
Also used : CentralJobScheduler(org.neo4j.kernel.impl.scheduler.CentralJobScheduler)

Example 2 with CentralJobScheduler

use of org.neo4j.kernel.impl.scheduler.CentralJobScheduler in project neo4j by neo4j.

the class PropertyStoreTraceIT method configure.

@ExtensionCallback
void configure(TestDatabaseManagementServiceBuilder builder) {
    var dependencies = new Dependencies();
    // disabling periodic id buffers maintenance jobs
    dependencies.satisfyDependency(new CentralJobScheduler(Clocks.nanoClock()) {

        @Override
        public JobHandle<?> scheduleRecurring(Group group, JobMonitoringParams monitoredJobParams, Runnable runnable, long period, TimeUnit timeUnit) {
            return JobHandle.EMPTY;
        }

        @Override
        public JobHandle<?> scheduleRecurring(Group group, JobMonitoringParams monitoredJobParams, Runnable runnable, long initialDelay, long period, TimeUnit unit) {
            return JobHandle.EMPTY;
        }
    });
    builder.setExternalDependencies(dependencies);
}
Also used : Group(org.neo4j.scheduler.Group) JobHandle(org.neo4j.scheduler.JobHandle) TimeUnit(java.util.concurrent.TimeUnit) Dependencies(org.neo4j.collection.Dependencies) CentralJobScheduler(org.neo4j.kernel.impl.scheduler.CentralJobScheduler) JobMonitoringParams(org.neo4j.scheduler.JobMonitoringParams) ExtensionCallback(org.neo4j.test.extension.ExtensionCallback)

Aggregations

CentralJobScheduler (org.neo4j.kernel.impl.scheduler.CentralJobScheduler)2 TimeUnit (java.util.concurrent.TimeUnit)1 Dependencies (org.neo4j.collection.Dependencies)1 Group (org.neo4j.scheduler.Group)1 JobHandle (org.neo4j.scheduler.JobHandle)1 JobMonitoringParams (org.neo4j.scheduler.JobMonitoringParams)1 ExtensionCallback (org.neo4j.test.extension.ExtensionCallback)1