- Type Parameters:
M- the type of elements stored inside the memory
- All Superinterfaces:
DeltaInsertMemory
- All Known Subinterfaces:
GroupingReteMemory<V>
- All Known Implementing Classes:
GroupingReteMemoryWrapper
Describes a general session-level memory interface related to the Rete algorithm.
This implementation distinguishes three general Rete stages:
- Computing delta objects, i.e., changes in working memory structures caused by various actions like memory inserts.
- Acting on these changes, for example computing condition memories or executing a rule's RHS.
- Committing the changes, like saving the changes into permanent storage.
-
Method Summary
Modifier and TypeMethodDescriptioniterator(MemoryScope scope) Provides an iterator over permanent or temporary (uncommitted) storage depending on the specified scope.stream(MemoryScope scope) Provides a default implementation for streaming over stored elements based on the provided scope.Methods inherited from interface org.evrete.api.spi.DeltaInsertMemory
clear, commit, commit
-
Method Details
-
iterator
Provides an iterator over permanent or temporary (uncommitted) storage depending on the specified scope.- Parameters:
scope- the memory scope indicating whether to iterate over main or delta storage- Returns:
- an iterator over storage elements of type M depending on the specified scope
-
stream
Provides a default implementation for streaming over stored elements based on the provided scope. Implementations are encouraged to override this method to create parallel streams, if possible.- Parameters:
scope- the memory scope indicating whether to stream over main or delta storage- Returns:
- a stream over elements in the storage of the provided scope
-