Interface Store
- All Known Subinterfaces:
TopDownStore
- All Known Implementing Classes:
BufferedStore
,EmptyStore
,SynchronizedBufferedStore
,TopDownBufferedStore
,TopDownUnbufferedStore
,UnbufferedStore
- Author:
- angele
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addNegatedNeighbour
(And join) add a negated rule body operator as next operatorvoid
addNeighbour
(And join) add a rule body operator as next operatorvoid
add a relation (at the beginning)void
evaluate()
evaluate the storevoid
evaluationFinished
(long querykey) Evaluation for query with querykey is finishedget all received tuplesint
getArity()
the arity of the tuplesget the last stores resultsget all neighboursget the basic tuple stoeboolean
Store is subsumed.void
readAccessBegin
(Set<Integer> tickets, boolean lock) Reading of the store by an operator starts.boolean
readAccessEnd
(ProcessImp source, Set<Integer> tickets, boolean lock, boolean pushed) Reading of a store ends.boolean
receive a whole relation with tuplesboolean
receiveTuple
(int tuple) receive a single tupleboolean
receiveTuple
(long[] tuple) receive a single tuplelong
size()
startTuples
(Receiver source, boolean check4Duplicates) a process which delivers single tuples startstoString()
void
triggerNeighbours
(int ticket) trigger neighbours for evaluationvoid
tuplesFinished
(boolean isBottomUp) finish of delivery of single tuplesvoid
tuplesFinished
(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, setStratum
Methods inherited from interface com.semedy.reasoner.api.reasoning.Receiver
receiveTuple
-
Method Details
-
evaluationFinished
Evaluation for query with querykey is finished- Specified by:
evaluationFinished
in interfaceProcess
- Throws:
ReasoningException
SemReasonerException
-
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:
ReasoningException
IOException
SemReasonerException
-
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:
IOException
SemReasonerException
-
receiveRelation
boolean receiveRelation(ReasoningRelation R) throws SemReasonerException, InterruptedException, IOException receive a whole relation with tuples- Specified by:
receiveRelation
in interfaceReceiver
- Parameters:
R
- the whole relation to be received- Returns:
- true, if relation is later on dissolved, false otherwise
- Throws:
ReasoningException
InterruptedException
IOException
SemReasonerException
-
addRelation
add a relation (at the beginning)- Specified by:
addRelation
in interfaceProcess
- Specified by:
addRelation
in interfaceReceiver
- Parameters:
R
- the relation to be added- Throws:
IOException
EDBException
-
startTuples
a process which delivers single tuples starts- Specified by:
startTuples
in interfaceReceiver
- Parameters:
source
- , the process delivering the tuplescheck4Duplicates
- , eliminate duplicates- Returns:
- an object receiving the results
- Throws:
EDBException
IOException
-
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:
receiveTuple
in interfaceReceiver
- Parameters:
tuple
-- Returns:
- true if tuple has been used (tuple cannot be free'd up)
- Throws:
SemReasonerException
IOException
-
receiveTuple
receive a single tuple- Specified by:
receiveTuple
in interfaceReceiver
- Parameters:
tuple
-- Returns:
- true if tuple has been used (tuple cannot be free'd up)
- Throws:
SemReasonerException
IOException
-
getTupleStore
TupleStore getTupleStore()get the basic tuple stoe- Specified by:
getTupleStore
in interfaceProcess
- Specified by:
getTupleStore
in interfaceReceiver
- Returns:
- the tuple store
-
evaluate
evaluate the store- Specified by:
evaluate
in interfaceProcess
- Throws:
InterruptedException
ReasoningException
IOException
SemReasonerException
-
tuplesFinished
void tuplesFinished(String annotation, ReasoningRelation R1, ReasoningRelation R2) throws IOException, SemReasonerException, InterruptedException finish of delivery of single tuples- Specified by:
tuplesFinished
in interfaceReceiver
- Parameters:
annotation
-R1
- ,R2
-- Throws:
IOException
ReasoningException
SemReasonerException
InterruptedException
-
tuplesFinished
void tuplesFinished(boolean isBottomUp) throws SemReasonerException, InterruptedException, IOException finish of delivery of single tuples- Specified by:
tuplesFinished
in interfaceReceiver
- Parameters:
isBottomUp
- TODO- Throws:
ReasoningException
SemReasonerException
InterruptedException
IOException
-
triggerNeighbours
trigger neighbours for evaluation- Parameters:
ticket
-- Throws:
IOException
ReasoningException
SemReasonerException
-
getNeighbours
get all neighbours- Returns:
-
getLastResults
ReasoningRelation getLastResults()get the last stores results- Returns:
-