Package com.semedy.reasoner.api.core
Class StoreEventResultReceiver
java.lang.Object
com.semedy.reasoner.reasoning.processes.ProcessImp
com.semedy.reasoner.api.core.EventResultReceiver
com.semedy.reasoner.api.core.StoreEventResultReceiver
Stores results during materialization in edb
Single events are buffered until reasoning is finished.
Single events are buffered until reasoning is finished.
- Author:
- angele
-
Constructor Summary
ConstructorsConstructorDescriptionStoreEventResultReceiver(InterruptFlag interruptFlag, DeductiveDatabase ddb, String predicateSymbol, int arity, String tempDir, String edbDir, boolean isPersistent, boolean writeLock, ReasoningMonitor monitor) -
Method Summary
Modifier and TypeMethodDescriptionvoidAfter finishing the evaluation the buffered results (either in a main memory relation or in a file)
are stored in the edb.voidevaluationFinished(long querykey) After finishing the evaluation the buffered results (either in a main memory relation or in a file)
are stored in the edb.get the symboltable to decode the resultsvoidreceiveResult(long[] result) Receive a new result as a tuple of codes.voidreceiveResult(TupleBuffer result) Receive a new result as a tuple of codes.voidretractResult(long[] result) retract a resultvoidsetSymbolTable(SymbolTable symbols) set the symbol table to decode the resultsMethods inherited from class com.semedy.reasoner.api.core.EventResultReceiver
receiveRelationMethods inherited from class com.semedy.reasoner.reasoning.processes.ProcessImp
addNextReceiver, addRelation, clear, dispose, evaluate, getArity, getPriority, getStratum, getTupleStore, isNotQueuedSetQueued, isQueued, nextReceiver, operationFinished, receiveTuple, receiveTuple, receiveTuple, setDataFlowGraph, setQueued, setStratum, startTuples, tuplesFinished, tuplesFinished
-
Constructor Details
-
StoreEventResultReceiver
public StoreEventResultReceiver(InterruptFlag interruptFlag, DeductiveDatabase ddb, String predicateSymbol, int arity, String tempDir, String edbDir, boolean isPersistent, boolean writeLock, ReasoningMonitor monitor)
-
-
Method Details
-
receiveResult
Receive a new result as a tuple of codes.
Buffer result either in a main memory relation (main memory case) or store it in a file (persistent case)- Specified by:
receiveResultin classEventResultReceiver- Throws:
IOExceptionReasoningException
-
retractResult
retract a result- Specified by:
retractResultin classEventResultReceiver- Throws:
IOExceptionReasoningException
-
receiveResult
Receive a new result as a tuple of codes.
Buffer result either in a main memory relation (main memory case) or store it in a file (persistent case)- Specified by:
receiveResultin classEventResultReceiver- Throws:
IOExceptionReasoningException
-
setSymbolTable
Description copied from class:EventResultReceiverset the symbol table to decode the results- Specified by:
setSymbolTablein classEventResultReceiver
-
getSymbolTable
Description copied from class:EventResultReceiverget the symboltable to decode the results- Specified by:
getSymbolTablein classEventResultReceiver- Returns:
-
evaluationFinished
After finishing the evaluation the buffered results (either in a main memory relation or in a file)
are stored in the edb.
Codes which have been generated during reasoning (by a built-in or by a function) have to be reencoded
as the reasoning symbol table has different codes compared to the base symbol table.- Overrides:
evaluationFinishedin classProcessImp- Throws:
SemReasonerExceptionIOException
-
evaluationFinished
After finishing the evaluation the buffered results (either in a main memory relation or in a file)
are stored in the edb.
Codes which have been generated during reasoning (by a built-in or by a function) have to be reencoded
as the reasoning symbol table has different codes compared to the base symbol table.- Specified by:
evaluationFinishedin interfaceProcess- Overrides:
evaluationFinishedin classProcessImp- Throws:
ReasoningExceptionSemReasonerExceptionIOException
-