java.lang.Object
org.evrete.util.GroupingReteMemoryWrapper<V>
- All Implemented Interfaces:
ReteMemory<Long>,DeltaInsertMemory,GroupingReteMemory<V>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears all elements from both delta and main storage.voidcommit()Converts the accumulated delta changes into main (permanent) storage.voidDeletes the given key and value from both delta and main memories.voidBuffers a new key/value combination into the delta memory.iterator(MemoryScope scope) Provides an iterator over permanent or temporary (uncommitted) storage depending on the specified scope.toString()valueIterator(MemoryScope scope, long key) Returns an iterator over values.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.evrete.api.spi.DeltaInsertMemory
commitMethods inherited from interface org.evrete.api.spi.GroupingReteMemory
keyIterator, streamMethods inherited from interface org.evrete.api.ReteMemory
stream
-
Constructor Details
-
GroupingReteMemoryWrapper
-
-
Method Details
-
insert
Description copied from interface:GroupingReteMemoryBuffers a new key/value combination into the delta memory.- Specified by:
insertin interfaceGroupingReteMemory<V>- Parameters:
key- the key to be insertedvalue- the value associated with the key
-
delete
Description copied from interface:GroupingReteMemoryDeletes the given key and value from both delta and main memories. If the value is the last one stored under this key, the key must be deleted as well.- Specified by:
deletein interfaceGroupingReteMemory<V>- Parameters:
key- the key to be deletedvalue- the value associated with the key
-
valueIterator
Description copied from interface:GroupingReteMemoryReturns an iterator over values.- Specified by:
valueIteratorin interfaceGroupingReteMemory<V>- Parameters:
scope- the scope of the values (not the keys)key- the key identifying the values to iterate over- Returns:
- an iterator over the values associated with the given key in the specified scope
-
iterator
Description copied from interface:ReteMemoryProvides an iterator over permanent or temporary (uncommitted) storage depending on the specified scope.- Specified by:
iteratorin interfaceReteMemory<V>- 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
-
commit
public void commit()Description copied from interface:DeltaInsertMemoryConverts the accumulated delta changes into main (permanent) storage.- Specified by:
commitin interfaceDeltaInsertMemory
-
clear
public void clear()Description copied from interface:DeltaInsertMemoryClears all elements from both delta and main storage.- Specified by:
clearin interfaceDeltaInsertMemory
-
toString
-