Search in sources :

Example 16 with Mappings

use of com.b2international.index.mapping.Mappings 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

Mappings (com.b2international.index.mapping.Mappings)16 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)15 Index (com.b2international.index.Index)13 Before (org.junit.Before)7 RepositoryConfiguration (com.b2international.snowowl.core.config.RepositoryConfiguration)5 ValidationRepository (com.b2international.snowowl.core.internal.validation.ValidationRepository)4 ValidationRule (com.b2international.snowowl.core.validation.rule.ValidationRule)4 ValidationIssue (com.b2international.snowowl.core.validation.issue.ValidationIssue)3 ValidationWhiteList (com.b2international.snowowl.core.validation.whitelist.ValidationWhiteList)3 ItemIdGenerationStrategy (com.b2international.snowowl.snomed.cis.gen.ItemIdGenerationStrategy)3 DefaultSnomedIdentifierService (com.b2international.snowowl.snomed.cis.memory.DefaultSnomedIdentifierService)3 DefaultRevisionIndex (com.b2international.index.revision.DefaultRevisionIndex)2 RevisionIndex (com.b2international.index.revision.RevisionIndex)2 ClassPathScanner (com.b2international.snowowl.core.plugin.ClassPathScanner)2 ValidationIssueDetailExtensionProvider (com.b2international.snowowl.core.validation.issue.ValidationIssueDetailExtensionProvider)2 SnomedIdentifierConfiguration (com.b2international.snowowl.snomed.cis.SnomedIdentifierConfiguration)2 SctId (com.b2international.snowowl.snomed.cis.domain.SctId)2 SequentialItemIdGenerationStrategy (com.b2international.snowowl.snomed.cis.gen.SequentialItemIdGenerationStrategy)2 SnomedIdentifierReservationServiceImpl (com.b2international.snowowl.snomed.cis.internal.reservations.SnomedIdentifierReservationServiceImpl)2 CompareUtils (com.b2international.commons.CompareUtils)1