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
ConstructorDescriptionStoreEventResultReceiver
(InterruptFlag interruptFlag, DeductiveDatabase ddb, String predicateSymbol, int arity, String tempDir, String edbDir, boolean isPersistent, boolean writeLock, ReasoningMonitor monitor) -
Method Summary
Modifier and TypeMethodDescriptionvoid
After finishing the evaluation the buffered results (either in a main memory relation or in a file)
are stored in the edb.void
evaluationFinished
(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 resultsvoid
receiveResult
(long[] result) Receive a new result as a tuple of codes.void
receiveResult
(TupleBuffer result) Receive a new result as a tuple of codes.void
retractResult
(long[] result) retract a resultvoid
setSymbolTable
(SymbolTable symbols) set the symbol table to decode the resultsMethods inherited from class com.semedy.reasoner.api.core.EventResultReceiver
receiveRelation
Methods 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:
receiveResult
in classEventResultReceiver
- Throws:
IOException
ReasoningException
-
retractResult
retract a result- Specified by:
retractResult
in classEventResultReceiver
- Throws:
IOException
ReasoningException
-
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:
receiveResult
in classEventResultReceiver
- Throws:
IOException
ReasoningException
-
setSymbolTable
Description copied from class:EventResultReceiver
set the symbol table to decode the results- Specified by:
setSymbolTable
in classEventResultReceiver
-
getSymbolTable
Description copied from class:EventResultReceiver
get the symboltable to decode the results- Specified by:
getSymbolTable
in 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:
evaluationFinished
in classProcessImp
- Throws:
SemReasonerException
IOException
-
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:
evaluationFinished
in interfaceProcess
- Overrides:
evaluationFinished
in classProcessImp
- Throws:
ReasoningException
SemReasonerException
IOException
-