Search in sources :

Example 6 with ClassificationTracker

use of com.b2international.snowowl.snomed.reasoner.classification.ClassificationTracker 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

ClassificationTracker (com.b2international.snowowl.snomed.reasoner.classification.ClassificationTracker)6 Branch (com.b2international.snowowl.core.branch.Branch)3 BadRequestException (com.b2international.commons.exceptions.BadRequestException)2 LockedException (com.b2international.commons.exceptions.LockedException)2 SnomedCoreConfiguration (com.b2international.snowowl.snomed.datastore.config.SnomedCoreConfiguration)2 ReasonerApiException (com.b2international.snowowl.snomed.reasoner.exceptions.ReasonerApiException)2 Index (com.b2international.index.Index)1 BranchContext (com.b2international.snowowl.core.domain.BranchContext)1 TransactionContext (com.b2international.snowowl.core.domain.TransactionContext)1 Request (com.b2international.snowowl.core.events.Request)1 BulkRequest (com.b2international.snowowl.core.events.bulk.BulkRequest)1 RemoteJob (com.b2international.snowowl.core.jobs.RemoteJob)1 Locks (com.b2international.snowowl.core.locks.Locks)1 CommitResult (com.b2international.snowowl.core.request.CommitResult)1 ClassificationSchedulingRule (com.b2international.snowowl.snomed.reasoner.classification.ClassificationSchedulingRule)1 IProgressMonitor (org.eclipse.core.runtime.IProgressMonitor)1 SubMonitor (org.eclipse.core.runtime.SubMonitor)1 OWLOntologyCreationException (org.semanticweb.owlapi.model.OWLOntologyCreationException)1 OWLReasonerRuntimeException (org.semanticweb.owlapi.reasoner.OWLReasonerRuntimeException)1 ReasonerInterruptedException (org.semanticweb.owlapi.reasoner.ReasonerInterruptedException)1