org.semanticweb.elk.reasoner.stages
Class AbstractStageExecutor

java.lang.Object
  extended by org.semanticweb.elk.util.concurrent.computation.SimpleInterrupter
      extended by org.semanticweb.elk.reasoner.stages.AbstractStageExecutor
All Implemented Interfaces:
ReasonerStageExecutor, Interrupter
Direct Known Subclasses:
LoggingStageExecutor, SimpleStageExecutor

public abstract class AbstractStageExecutor
extends SimpleInterrupter
implements ReasonerStageExecutor

An abstract base class which implements a very simple logic of executing stages: first check the completion flag, if false - first complete all dependencies, and finally execute the stage.

Author:
Pavel Klinov pavel.klinov@uni-ulm.de

Constructor Summary
AbstractStageExecutor()
           
 
Method Summary
 void complete(ReasonerStage stage)
          Makes sure that the given stage is completed; it might not necessarily execute this stage if the results are already computed
protected abstract  void execute(ReasonerStage stage)
           
 
Methods inherited from class org.semanticweb.elk.util.concurrent.computation.SimpleInterrupter
clearInterrupt, clearThreadToInterrupt, interrupt, isInterrupted, registerCurrentThreadToInterrupt, registerThreadToInterrupt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.semanticweb.elk.util.concurrent.computation.Interrupter
clearInterrupt, interrupt, isInterrupted
 

Constructor Detail

AbstractStageExecutor

public AbstractStageExecutor()
Method Detail

complete

public void complete(ReasonerStage stage)
              throws ElkException
Description copied from interface: ReasonerStageExecutor
Makes sure that the given stage is completed; it might not necessarily execute this stage if the results are already computed

Specified by:
complete in interface ReasonerStageExecutor
Parameters:
stage - the reasoner stage to be completed
Throws:
ElkException - if the stage cannot be competed successfully

execute

protected abstract void execute(ReasonerStage stage)
                         throws ElkException
Throws:
ElkException


Copyright © 2011-2013 Department of Computer Science, University of Oxford. All Rights Reserved.