Search in sources :

Example 1 with RemoteJobTracker

use of com.b2international.snowowl.core.jobs.RemoteJobTracker in project snow-owl by b2ihealthcare.

the class RepositoryPlugin method initializeJobSupport.

private void initializeJobSupport(Environment env, SnowOwlConfiguration configuration) {
    final ObjectMapper objectMapper = env.service(ObjectMapper.class);
    final Index jobsIndex = Indexes.createIndex(JOBS_INDEX, objectMapper, new Mappings(RemoteJobEntry.class), env.service(IndexSettings.class).forIndex(env.service(RepositoryConfiguration.class).getIndexConfiguration(), JOBS_INDEX));
    // TODO make this configurable
    final long defaultJobCleanUpInterval = TimeUnit.MINUTES.toMillis(1);
    env.services().registerService(RemoteJobTracker.class, new RemoteJobTracker(jobsIndex, env.service(IEventBus.class), objectMapper, defaultJobCleanUpInterval));
}
Also used : Mappings(com.b2international.index.mapping.Mappings) RemoteJobTracker(com.b2international.snowowl.core.jobs.RemoteJobTracker) Index(com.b2international.index.Index) RepositoryConfiguration(com.b2international.snowowl.core.config.RepositoryConfiguration) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) RemoteJobEntry(com.b2international.snowowl.core.jobs.RemoteJobEntry)

Aggregations

Index (com.b2international.index.Index)1 Mappings (com.b2international.index.mapping.Mappings)1 RepositoryConfiguration (com.b2international.snowowl.core.config.RepositoryConfiguration)1 RemoteJobEntry (com.b2international.snowowl.core.jobs.RemoteJobEntry)1 RemoteJobTracker (com.b2international.snowowl.core.jobs.RemoteJobTracker)1 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1