Class EmptyStore
java.lang.Object
com.semedy.reasoner.reasoning.processes.ProcessImp
com.semedy.reasoner.reasoning.processes.UnbufferedStore
com.semedy.reasoner.reasoning.processes.BufferedStore
com.semedy.reasoner.reasoning.processes.EmptyStore
An empty store, i.E. all incoming tuples are thrown away
- Author:
- angele
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddNegatedNeighbour(And join) add a negated rule body operator as next operatorvoidaddNeighbour(And join) add a rule body operator as next operatorvoidattach a next receiver which receives input from thisvoidadd a whole relation at the beginningvoidclear()free up ressourcesvoiddispose()free ressources allocated by this processvoidevaluate()evaluate a process during reasoning.voidevaluationFinished(long querykey) the whole evaluation is finishedget all received tuplesintgetArity()arity of the tuplesget the last stores resultsget all neighboursintget the priority of a processintget the stratumget the basic tuple storebooleanIf process is not queued for reasoning set it as queued for reasoningbooleanStore is subsumed.get next processvoidthis process is finishedvoidreadAccessBegin(Set<Integer> tickets, boolean lock) Reading of the store by an operator starts.booleanreadAccessEnd(ProcessImp source, Set<Integer> tickets, boolean lock, boolean pushed) Reading of a store ends.booleanreceive a whole relationbooleanreceiveTuple(int tuple) receive a single tuplebooleanreceiveTuple(long[] tuple) receive a single tuplebooleanreceiveTuple(TupleBuffer tuple) receive a single tuplevoidsetDataFlowGraph(ProcessExecutor processExecutor) set the executor for this processvoidsetStratum(int s) set the stratum of this processlongsize()startTuples(Receiver source, boolean check4Duplicates) start delivering single tuplesvoidtriggerNeighbours(int ticket) trigger neighbours for evaluationvoidtuplesFinished(boolean isBottomUp) finish delivering single tuplesvoidtuplesFinished(String annotation, ReasoningRelation R1, ReasoningRelation R2) Finish delivering single tuples.Methods inherited from class com.semedy.reasoner.reasoning.processes.BufferedStore
bufferedSize, reset1Methods inherited from class com.semedy.reasoner.reasoning.processes.UnbufferedStore
incrementalSize, toStringMethods inherited from class com.semedy.reasoner.reasoning.processes.ProcessImp
evaluationFinished, isQueued, setQueuedMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
EmptyStore
public EmptyStore(int arity) - Parameters:
interruptFlag-monitor-arity-predicate-cepReasoning-cepReasoningWithRetracts-executor-sorted-
-
-
Method Details
-
getPriority
public int getPriority()Description copied from interface:Processget the priority of a process- Specified by:
getPriorityin interfaceProcess- Overrides:
getPriorityin classProcessImp- Returns:
-
isNotQueuedSetQueued
public boolean isNotQueuedSetQueued()Description copied from interface:ProcessIf process is not queued for reasoning set it as queued for reasoning- Specified by:
isNotQueuedSetQueuedin interfaceProcess- Overrides:
isNotQueuedSetQueuedin classProcessImp- Returns:
-
setDataFlowGraph
Description copied from interface:Processset the executor for this process- Specified by:
setDataFlowGraphin interfaceProcess- Overrides:
setDataFlowGraphin classProcessImp
-
operationFinished
Description copied from interface:Processthis process is finished- Specified by:
operationFinishedin interfaceProcess- Overrides:
operationFinishedin classProcessImp- Throws:
SemReasonerException
-
addNextReceiver
Description copied from interface:Processattach a next receiver which receives input from this- Specified by:
addNextReceiverin interfaceProcess- Overrides:
addNextReceiverin classProcessImp
-
dispose
public void dispose()Description copied from interface:Processfree ressources allocated by this process- Specified by:
disposein interfaceProcess- Overrides:
disposein classProcessImp
-
setStratum
public void setStratum(int s) Description copied from interface:Processset the stratum of this process- Specified by:
setStratumin interfaceProcess- Overrides:
setStratumin classProcessImp
-
getStratum
public int getStratum()Description copied from interface:Processget the stratum- Specified by:
getStratumin interfaceProcess- Overrides:
getStratumin classProcessImp- Returns:
-
nextReceiver
Description copied from interface:Processget next process- Specified by:
nextReceiverin interfaceProcess- Overrides:
nextReceiverin classProcessImp- Returns:
-
clear
Description copied from class:ProcessImpfree up ressources- Specified by:
clearin interfaceProcess- Overrides:
clearin classBufferedStore- Throws:
IOException
-
receiveTuple
Description copied from interface:Receiverreceive a single tuple- Specified by:
receiveTuplein interfaceReceiver- Overrides:
receiveTuplein classBufferedStore- Parameters:
tuple- the tuple to be received- Returns:
- true if tuple has been used (tuple cannot be free'd up)
- Throws:
IOExceptionReasoningExceptionSemReasonerException
-
evaluationFinished
Description copied from interface:Processthe whole evaluation is finished- Specified by:
evaluationFinishedin interfaceProcess- Specified by:
evaluationFinishedin interfaceStore- Overrides:
evaluationFinishedin classBufferedStore- Throws:
ReasoningExceptionSemReasonerException
-
size
- Specified by:
sizein interfaceStore- Overrides:
sizein classBufferedStore- Returns:
- Throws:
IOExceptionEDBException- How many tuples are stored
-
getAllTuples
- Specified by:
getAllTuplesin interfaceStore- Overrides:
getAllTuplesin classBufferedStore- Returns:
- Throws:
EDBException- get a list of all relations stored in storeIOException
-
getAllTuplesInOne
Description copied from interface:Storeget all received tuples- Specified by:
getAllTuplesInOnein interfaceStore- Overrides:
getAllTuplesInOnein classBufferedStore- Returns:
- Throws:
IOException
-
addNegatedNeighbour
Description copied from interface:Storeadd a negated rule body operator as next operator- Specified by:
addNegatedNeighbourin interfaceStore- Overrides:
addNegatedNeighbourin classBufferedStore
-
addNeighbour
Description copied from interface:Storeadd a rule body operator as next operator- Specified by:
addNeighbourin interfaceStore- Overrides:
addNeighbourin classBufferedStore
-
readAccessBegin
Description copied from interface:StoreReading of the store by an operator starts.
Every reading is uniquely identified by a ticket.
Lock indicates that ressources must be locked- Specified by:
readAccessBeginin interfaceStore- Overrides:
readAccessBeginin classBufferedStore
-
readAccessEnd
public boolean readAccessEnd(ProcessImp source, Set<Integer> tickets, boolean lock, boolean pushed) throws IOException, SemReasonerException Description copied from interface:StoreReading of a store ends.- Specified by:
readAccessEndin interfaceStore- Overrides:
readAccessEndin classBufferedStore- Parameters:
source- , the readertickets- , the ticket of the reading processlock- , was a lock required at begin of the reading processpushed- , have relations be pushed instead of joined- Returns:
- Throws:
IOExceptionSemReasonerException
-
receiveRelation
public boolean receiveRelation(ReasoningRelation R) throws SemReasonerException, InterruptedException, IOException Description copied from interface:Receiverreceive a whole relation- Specified by:
receiveRelationin interfaceReceiver- Specified by:
receiveRelationin interfaceStore- Overrides:
receiveRelationin classBufferedStore- Parameters:
R- the whole relation to be received- Returns:
- true, if relation is later on dissolved, false otherwise
- Throws:
ReasoningExceptionInterruptedExceptionIOExceptionSemReasonerException
-
addRelation
Description copied from interface:Receiveradd a whole relation at the beginning- Specified by:
addRelationin interfaceProcess- Specified by:
addRelationin interfaceReceiver- Specified by:
addRelationin interfaceStore- Overrides:
addRelationin classBufferedStore- Parameters:
R- the relation to be added- Throws:
IOExceptionEDBException
-
startTuples
public Receiver startTuples(Receiver source, boolean check4Duplicates) throws EDBException, IOException Description copied from interface:Receiverstart delivering single tuples- Specified by:
startTuplesin interfaceReceiver- Specified by:
startTuplesin interfaceStore- Overrides:
startTuplesin classUnbufferedStore- Parameters:
source- , the delivering processcheck4Duplicates- , check for duplicates in the target store- Returns:
- an object receiving the results
- Throws:
EDBExceptionIOException
-
incrementalRelations
- Specified by:
incrementalRelationsin interfaceStore- Overrides:
incrementalRelationsin classUnbufferedStore- Returns:
- Throws:
IOExceptionEDBException- get a list of incremental relations
-
relations
- Specified by:
relationsin interfaceStore- Overrides:
relationsin classUnbufferedStore- Returns:
- Throws:
IOExceptionEDBException- get a list of received relations
-
getArity
public int getArity()Description copied from interface:Receiverarity of the tuples -
isSubsumed
public boolean isSubsumed()Description copied from interface:StoreStore is subsumed. This means that no additional tuples are stored.- Specified by:
isSubsumedin interfaceStore- Overrides:
isSubsumedin classBufferedStore- Returns:
-
receiveTuple
Description copied from interface:Receiverreceive a single tuple- Specified by:
receiveTuplein interfaceReceiver- Specified by:
receiveTuplein interfaceStore- Overrides:
receiveTuplein classBufferedStore- Parameters:
tuple- the tuple to be received- Returns:
- true if tuple has been used (tuple cannot be free'd up)
- Throws:
SemReasonerExceptionIOException
-
receiveTuple
Description copied from interface:Receiverreceive a single tuple- Specified by:
receiveTuplein interfaceReceiver- Specified by:
receiveTuplein interfaceStore- Overrides:
receiveTuplein classBufferedStore- Parameters:
tuple- the tuple to be received- Returns:
- true if tuple has been used (tuple cannot be free'd up)
- Throws:
SemReasonerExceptionIOException
-
getTupleStore
Description copied from interface:Receiverget the basic tuple store- Specified by:
getTupleStorein interfaceProcess- Specified by:
getTupleStorein interfaceReceiver- Specified by:
getTupleStorein interfaceStore- Overrides:
getTupleStorein classBufferedStore- Returns:
- the tuple store
-
evaluate
Description copied from interface:Processevaluate a process during reasoning.
Returns how the number of tuples sent away- Specified by:
evaluatein interfaceProcess- Specified by:
evaluatein interfaceStore- Overrides:
evaluatein classBufferedStore- Throws:
InterruptedExceptionReasoningExceptionIOExceptionSemReasonerException
-
tuplesFinished
public void tuplesFinished(String annotation, ReasoningRelation R1, ReasoningRelation R2) throws IOException, SemReasonerException, InterruptedException Description copied from interface:ReceiverFinish delivering single tuples.
Cache result and annotate result.- Specified by:
tuplesFinishedin interfaceReceiver- Specified by:
tuplesFinishedin interfaceStore- Overrides:
tuplesFinishedin classBufferedStore- Parameters:
annotation- , an annotation used for cachingR1- , the relations which have been combinedR2- , the relations which have been combined- Throws:
IOExceptionReasoningExceptionSemReasonerExceptionInterruptedException
-
tuplesFinished
public void tuplesFinished(boolean isBottomUp) throws SemReasonerException, InterruptedException, IOException Description copied from interface:Receiverfinish delivering single tuples- Specified by:
tuplesFinishedin interfaceReceiver- Specified by:
tuplesFinishedin interfaceStore- Overrides:
tuplesFinishedin classBufferedStore- Parameters:
isBottomUp- TODO- Throws:
ReasoningExceptionSemReasonerExceptionInterruptedExceptionIOException
-
triggerNeighbours
Description copied from interface:Storetrigger neighbours for evaluation- Specified by:
triggerNeighboursin interfaceStore- Overrides:
triggerNeighboursin classBufferedStore- Throws:
ReasoningExceptionIOExceptionSemReasonerException
-
getNeighbours
Description copied from interface:Storeget all neighbours- Specified by:
getNeighboursin interfaceStore- Overrides:
getNeighboursin classBufferedStore- Returns:
-
getLastResults
Description copied from interface:Storeget the last stores results- Specified by:
getLastResultsin interfaceStore- Overrides:
getLastResultsin classBufferedStore- Returns:
-