|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BetaLeftMemory
BetaLeftMemory
The BetaLeftMemory
is the interface for all classes
implementing the left memory of a BetaMemory
instance.
The left memory is responsible for indexing and storing references
to all input tuples in the ReteOO network.
Specialized implementations for this interface are capable of indexing
and partitioning the tuples with the objective of improve query time.
Although, the implementations are all required to keep the order of
objects, and return then in order when iterating over.
Method Summary | |
---|---|
void |
add(WorkingMemory workingMemory,
MultiLinkedListNodeWrapper tuple)
Adds the given tuple to the memory |
void |
add(WorkingMemory workingMemory,
ReteTuple tuple)
Adds the given tuple to the memory |
BetaLeftMemory |
getInnerMemory()
Returns the inner beta left memory in case of a multi-indexed memory |
boolean |
isEmpty()
Checks if this memory is empty |
boolean |
isPossibleMatch(MultiLinkedListNodeWrapper tuple)
Returns true if the tuple is a possible match to the handle passed to the previous selectPossibleMatches() call |
java.util.Iterator |
iterator()
Returns an iterator to iterate over all tuples in the beta left memory This method is much heavier than the iterator(workingMemory, handle) method as it is not backed by a data structure. |
java.util.Iterator |
iterator(WorkingMemory workingMemory,
InternalFactHandle handle)
Returns an iterator to iterate over tuples that attend the binder/handle constraints |
void |
remove(WorkingMemory workingMemory,
MultiLinkedListNodeWrapper tuple)
Remove the given tuple from the memory |
void |
remove(WorkingMemory workingMemory,
ReteTuple tuple)
Remove the given tuple from the memory |
void |
selectPossibleMatches(WorkingMemory workingMemory,
InternalFactHandle handle)
Prepares the left memory for subsequent calls of isPossibleMatch() based on the constraints applied to the handle. |
void |
setInnerMemory(BetaLeftMemory innerMemory)
Sets the inner beta left memory in case of a multi-indexed memory |
int |
size()
Returns the number of tuples currently stored in the left memory |
Method Detail |
---|
void add(WorkingMemory workingMemory, MultiLinkedListNodeWrapper tuple)
workingMemory
- the working memory referencetuple
- the tuple to addvoid remove(WorkingMemory workingMemory, MultiLinkedListNodeWrapper tuple)
workingMemory
- the working memory referencetuple
- the tuple to removevoid add(WorkingMemory workingMemory, ReteTuple tuple)
workingMemory
- the working memory referencetuple
- the tuple to addvoid remove(WorkingMemory workingMemory, ReteTuple tuple)
tuple
- the tuple to removejava.util.Iterator iterator(WorkingMemory workingMemory, InternalFactHandle handle)
workingMemory
- the working memory referencehandle
- the handle whose tuples will try to join
java.util.Iterator iterator()
int size()
boolean isEmpty()
void selectPossibleMatches(WorkingMemory workingMemory, InternalFactHandle handle)
workingMemory
- the working memory referencehandle
- the handle whose tuples shall matchboolean isPossibleMatch(MultiLinkedListNodeWrapper tuple)
tuple
-
void setInnerMemory(BetaLeftMemory innerMemory) throws javax.naming.OperationNotSupportedException
innerMemory
-
javax.naming.OperationNotSupportedException
BetaLeftMemory getInnerMemory() throws javax.naming.OperationNotSupportedException
javax.naming.OperationNotSupportedException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |