Search in sources :

Example 11 with SnomedCoreConfiguration

use of com.b2international.snowowl.snomed.datastore.config.SnomedCoreConfiguration in project snow-owl by b2ihealthcare.

the class SnomedReasonerPlugin method run.

@Override
public void run(final SnowOwlConfiguration configuration, final Environment env) throws Exception {
    if (env.isServer()) {
        final Index repositoryIndex = env.service(RepositoryManager.class).get(getToolingId()).service(Index.class);
        final SnomedCoreConfiguration snomedConfig = configuration.getModuleConfig(SnomedCoreConfiguration.class);
        final int maximumReasonerRuns = snomedConfig.getMaxReasonerRuns();
        // TODO: make this configurable
        final long cleanUpInterval = TimeUnit.MINUTES.toMillis(5L);
        final ClassificationTracker classificationTracker = new ClassificationTracker(repositoryIndex, maximumReasonerRuns, cleanUpInterval);
        env.services().registerService(ClassificationTracker.class, classificationTracker);
    }
}
Also used : SnomedCoreConfiguration(com.b2international.snowowl.snomed.datastore.config.SnomedCoreConfiguration) Index(com.b2international.index.Index) ClassificationTracker(com.b2international.snowowl.snomed.reasoner.classification.ClassificationTracker)

Aggregations

SnomedCoreConfiguration (com.b2international.snowowl.snomed.datastore.config.SnomedCoreConfiguration)11 RevisionIndex (com.b2international.index.revision.RevisionIndex)3 ISerializer (org.eclipse.xtext.serializer.ISerializer)3 Before (org.junit.Before)3 RevisionSearcher (com.b2international.index.revision.RevisionSearcher)2 TerminologyResource (com.b2international.snowowl.core.TerminologyResource)2 IndexConfiguration (com.b2international.snowowl.core.config.IndexConfiguration)2 RepositoryConfiguration (com.b2international.snowowl.core.config.RepositoryConfiguration)2 ReasonerTaxonomy (com.b2international.snowowl.snomed.datastore.index.taxonomy.ReasonerTaxonomy)2 ClassificationTracker (com.b2international.snowowl.snomed.reasoner.classification.ClassificationTracker)2 DelegateOntologyFactory (com.b2international.snowowl.snomed.reasoner.ontology.DelegateOntologyFactory)2 LockedException (com.b2international.commons.exceptions.LockedException)1 Index (com.b2international.index.Index)1 EclStandaloneSetup (com.b2international.snomed.ecl.EclStandaloneSetup)1 ResourceURI (com.b2international.snowowl.core.ResourceURI)1 AttachmentRegistry (com.b2international.snowowl.core.attachments.AttachmentRegistry)1 Branch (com.b2international.snowowl.core.branch.Branch)1 TransactionContext (com.b2international.snowowl.core.domain.TransactionContext)1 RequestBuilder (com.b2international.snowowl.core.events.RequestBuilder)1 BulkRequestBuilder (com.b2international.snowowl.core.events.bulk.BulkRequestBuilder)1