Search in sources :

Example 1 with JobCoordinatorImpl

use of org.opendaylight.infrautils.jobcoordinator.internal.JobCoordinatorImpl in project genius by opendaylight.

the class JobCoordinatorTestModule method configure.

// The GuiceRule needs to include
// CloseableModule.class, Jsr250Module (but not the AutoCloseableModule)
// directly or via the org.opendaylight.infrautils.inject.guice.testutils.AbstractGuiceJsr250Module
// for this to work.
@Override
protected void configure() {
    MetricProvider metricProvider = new TestMetricProviderImpl();
    JobCoordinatorImpl jobCoordinatorImpl = new JobCoordinatorImpl(metricProvider);
    bind(JobCoordinator.class).toInstance(jobCoordinatorImpl);
    bind(JobCoordinatorMonitor.class).toInstance(jobCoordinatorImpl);
}
Also used : JobCoordinatorMonitor(org.opendaylight.infrautils.jobcoordinator.JobCoordinatorMonitor) JobCoordinatorImpl(org.opendaylight.infrautils.jobcoordinator.internal.JobCoordinatorImpl) MetricProvider(org.opendaylight.infrautils.metrics.MetricProvider) TestMetricProviderImpl(org.opendaylight.infrautils.metrics.testimpl.TestMetricProviderImpl) JobCoordinator(org.opendaylight.infrautils.jobcoordinator.JobCoordinator)

Aggregations

JobCoordinator (org.opendaylight.infrautils.jobcoordinator.JobCoordinator)1 JobCoordinatorMonitor (org.opendaylight.infrautils.jobcoordinator.JobCoordinatorMonitor)1 JobCoordinatorImpl (org.opendaylight.infrautils.jobcoordinator.internal.JobCoordinatorImpl)1 MetricProvider (org.opendaylight.infrautils.metrics.MetricProvider)1 TestMetricProviderImpl (org.opendaylight.infrautils.metrics.testimpl.TestMetricProviderImpl)1