Package org.drools.core.common
Class ConcurrentNodeMemories
java.lang.Object
org.drools.core.common.ConcurrentNodeMemories
- All Implemented Interfaces:
NodeMemories
A concurrent implementation for the node memories interface
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()voidclearNodeMemory(MemoryFactory node) getNodeMemory(MemoryFactory node, ReteEvaluator reteEvaluator) The implementation tries to delay locking as much as possible, by running some potentially unsafe operations out of the critical session.intlength()Returns the number of positions in this memorypeekNodeMemory(int memoryId) Peeks at the content of the node memory for the given node ID.voidresetAllMemories(StatefulKnowledgeSession session) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.drools.core.common.NodeMemories
peekNodeMemory
-
Constructor Details
-
ConcurrentNodeMemories
-
-
Method Details
-
clearNodeMemory
- Specified by:
clearNodeMemoryin interfaceNodeMemories
-
clear
public void clear()- Specified by:
clearin interfaceNodeMemories
-
resetAllMemories
- Specified by:
resetAllMemoriesin interfaceNodeMemories
-
getNodeMemory
The implementation tries to delay locking as much as possible, by running some potentially unsafe operations out of the critical session. In case it fails the checks, it will move into the critical sessions and re-check everything before effectively doing any change on data structures.- Specified by:
getNodeMemoryin interfaceNodeMemories
-
peekNodeMemory
Description copied from interface:NodeMemoriesPeeks at the content of the node memory for the given node ID. This method has no side effects, so if the given memory slot for the given node ID is null, it will return null.- Specified by:
peekNodeMemoryin interfaceNodeMemories- Returns:
-
length
public int length()Description copied from interface:NodeMemoriesReturns the number of positions in this memory- Specified by:
lengthin interfaceNodeMemories- Returns:
-