org.semanticweb.elk.reasoner.saturation
Class ClassExpressionSaturationFactory<J extends SaturationJob<? extends IndexedClassExpression>>
java.lang.Object
org.semanticweb.elk.reasoner.saturation.ClassExpressionSaturationFactory<J>
- Type Parameters:
J - the type of the saturation jobs that can be processed by this
saturation engine
- All Implemented Interfaces:
- InputProcessorFactory<J,ClassExpressionSaturationFactory.Engine>
public class ClassExpressionSaturationFactory<J extends SaturationJob<? extends IndexedClassExpression>>
- extends Object
- implements InputProcessorFactory<J,ClassExpressionSaturationFactory.Engine>
The factory for engines that concurrently submit, process, and post-process
saturation jobs. Each saturation job requires to compute implied
super-classes of a given indexed class expression. The jobs are submitted
using the ClassExpressionSaturationFactory.Engine.submit(SaturationJob), and all currently submitted
jobs are processed using the ClassExpressionSaturationFactory.Engine.process(). To every
ClassExpressionSaturationFactory it is possible to attach a
ClassExpressionSaturationListener, which can implement hook methods
that perform certain actions during the processing, e.g., notifying when the
jobs are finished.
The implementation relies heavily on the Java's concurrency package and uses
several atomic integer to monitor the progress of the computation.
- Author:
- Frantisek Simancik, "Yevgeny Kazakov"
- See Also:
ClassExpressionSaturationListener
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ClassExpressionSaturationFactory
public ClassExpressionSaturationFactory(SaturationState saturationState,
int maxWorkers,
ClassExpressionSaturationListener<J> listener)
- Creates a new saturation engine using the given saturation state, listener
for callback functions, and threshold for the number of unprocessed
contexts. The threshold has influence on the size of the batches of the
input jobs that are processed simultaneously, which, in turn, has an
effect on throughput and latency of the saturation: in general, the
larger the threshold is, the faster it takes (in theory) to perform the
overall processing of jobs, but it might take longer to process an
individual job because it is possible to detect that the job is processed
only when the whole batch of jobs is processed.
- Parameters:
saturationState - the current state of saturationmaxWorkers - the maximum number of workers that can use this factorylistener - the listener object implementing callback functions
ClassExpressionSaturationFactory
public ClassExpressionSaturationFactory(RuleApplicationFactory ruleAppFactory,
int maxWorkers,
ClassExpressionSaturationListener<J> listener)
ClassExpressionSaturationFactory
public ClassExpressionSaturationFactory(RuleApplicationFactory ruleAppFactory,
int maxWorkers)
- Creates a new saturation factory using the given rule application factory.
- Parameters:
ruleAppFactory - maxWorkers - the maximum number of workers that can use this factory
getEngine
public ClassExpressionSaturationFactory.Engine getEngine()
- Specified by:
getEngine in interface InputProcessorFactory<J extends SaturationJob<? extends IndexedClassExpression>,ClassExpressionSaturationFactory.Engine>
printStatistics
public void printStatistics()
- Print statistics about the saturation
finish
public void finish()
- Specified by:
finish in interface InputProcessorFactory<J extends SaturationJob<? extends IndexedClassExpression>,ClassExpressionSaturationFactory.Engine>
getRuleAndConclusionStatistics
public SaturationStatistics getRuleAndConclusionStatistics()
Copyright © 2011-2013 Department of Computer Science, University of Oxford. All Rights Reserved.