Interface Store
- All Known Subinterfaces:
TopDownStore
- All Known Implementing Classes:
BufferedStore,EmptyStore,SynchronizedBufferedStore,TopDownBufferedStore,TopDownUnbufferedStore,UnbufferedStore
- Author:
- angele
-
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 operatorvoidadd a relation (at the beginning)voidevaluate()evaluate the storevoidevaluationFinished(long querykey) Evaluation for query with querykey is finishedget all received tuplesintgetArity()the arity of the tuplesget the last stores resultsget all neighboursget the basic tuple stoebooleanStore is subsumed.voidreadAccessBegin(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 relation with tuplesbooleanreceiveTuple(int tuple) receive a single tuplebooleanreceiveTuple(long[] tuple) receive a single tuplelongsize()startTuples(Receiver source, boolean check4Duplicates) a process which delivers single tuples startstoString()voidtriggerNeighbours(int ticket) trigger neighbours for evaluationvoidtuplesFinished(boolean isBottomUp) finish of delivery of single tuplesvoidtuplesFinished(String annotation, ReasoningRelation R1, ReasoningRelation R2) finish of delivery of single tuplesMethods inherited from interface com.semedy.reasoner.reasoning.processes.Process
addNextReceiver, clear, dispose, getPriority, getStratum, isNotQueuedSetQueued, isQueued, nextReceiver, operationFinished, setDataFlowGraph, setQueued, setStratumMethods inherited from interface com.semedy.reasoner.api.reasoning.Receiver
receiveTuple
-
Method Details
-
evaluationFinished
Evaluation for query with querykey is finished- Specified by:
evaluationFinishedin interfaceProcess- Throws:
ReasoningExceptionSemReasonerException
-
size
- Returns:
- Throws:
EDBException- How many tuples are storedIOException
-
getAllTuples
- Returns:
- Throws:
EDBException- get a list of all relations stored in storeIOException
-
getAllTuplesInOne
get all received tuples- Returns:
- Throws:
ReasoningExceptionIOExceptionSemReasonerException
-
addNegatedNeighbour
add a negated rule body operator as next operator- Parameters:
join-
-
addNeighbour
add a rule body operator as next operator- Parameters:
join-
-
readAccessBegin
Reading of the store by an operator starts.
Every reading is uniquely identified by a ticket.
Lock indicates that ressources must be locked- Parameters:
tickets-lock-
-
readAccessEnd
boolean readAccessEnd(ProcessImp source, Set<Integer> tickets, boolean lock, boolean pushed) throws IOException, SemReasonerException Reading of a store ends.- 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
boolean receiveRelation(ReasoningRelation R) throws SemReasonerException, InterruptedException, IOException receive a whole relation with tuples- Specified by:
receiveRelationin interfaceReceiver- Parameters:
R- the whole relation to be received- Returns:
- true, if relation is later on dissolved, false otherwise
- Throws:
ReasoningExceptionInterruptedExceptionIOExceptionSemReasonerException
-
addRelation
add a relation (at the beginning)- Specified by:
addRelationin interfaceProcess- Specified by:
addRelationin interfaceReceiver- Parameters:
R- the relation to be added- Throws:
IOExceptionEDBException
-
startTuples
a process which delivers single tuples starts- Specified by:
startTuplesin interfaceReceiver- Parameters:
source- , the process delivering the tuplescheck4Duplicates- , eliminate duplicates- Returns:
- an object receiving the results
- Throws:
EDBExceptionIOException
-
incrementalRelations
- Returns:
- Throws:
EDBException- get a list of incremental relationsIOException
-
relations
- Returns:
- Throws:
EDBException- get a list of received relationsIOException
-
getArity
int getArity()the arity of the tuples -
isSubsumed
boolean isSubsumed()Store is subsumed. This means that no additional tuples are stored.- Returns:
-
toString
String toString() -
receiveTuple
receive a single tuple- Specified by:
receiveTuplein interfaceReceiver- Parameters:
tuple-- Returns:
- true if tuple has been used (tuple cannot be free'd up)
- Throws:
SemReasonerExceptionIOException
-
receiveTuple
receive a single tuple- Specified by:
receiveTuplein interfaceReceiver- Parameters:
tuple-- Returns:
- true if tuple has been used (tuple cannot be free'd up)
- Throws:
SemReasonerExceptionIOException
-
getTupleStore
TupleStore getTupleStore()get the basic tuple stoe- Specified by:
getTupleStorein interfaceProcess- Specified by:
getTupleStorein interfaceReceiver- Returns:
- the tuple store
-
evaluate
evaluate the store- Specified by:
evaluatein interfaceProcess- Throws:
InterruptedExceptionReasoningExceptionIOExceptionSemReasonerException
-
tuplesFinished
void tuplesFinished(String annotation, ReasoningRelation R1, ReasoningRelation R2) throws IOException, SemReasonerException, InterruptedException finish of delivery of single tuples- Specified by:
tuplesFinishedin interfaceReceiver- Parameters:
annotation-R1- ,R2-- Throws:
IOExceptionReasoningExceptionSemReasonerExceptionInterruptedException
-
tuplesFinished
void tuplesFinished(boolean isBottomUp) throws SemReasonerException, InterruptedException, IOException finish of delivery of single tuples- Specified by:
tuplesFinishedin interfaceReceiver- Parameters:
isBottomUp- TODO- Throws:
ReasoningExceptionSemReasonerExceptionInterruptedExceptionIOException
-
triggerNeighbours
trigger neighbours for evaluation- Parameters:
ticket-- Throws:
IOExceptionReasoningExceptionSemReasonerException
-
getNeighbours
get all neighbours- Returns:
-
getLastResults
ReasoningRelation getLastResults()get the last stores results- Returns:
-