Drools :: Core 6.2.0.CR4

org.drools.core.common
Class ConcurrentNodeMemories

java.lang.Object
  extended by org.drools.core.common.ConcurrentNodeMemories
All Implemented Interfaces:
NodeMemories

public class ConcurrentNodeMemories
extends Object
implements NodeMemories

A concurrent implementation for the node memories interface


Constructor Summary
ConcurrentNodeMemories(InternalKnowledgeBase kBase)
           
 
Method Summary
 void clear()
           
 void clearNodeMemory(MemoryFactory node)
           
 Memory getNodeMemory(MemoryFactory node, InternalWorkingMemory wm)
          The implementation tries to delay locking as much as possible, by running some potentialy unsafe opperations out of the critical session.
 int length()
          Returns the number of positions in this memory
 Memory peekNodeMemory(int nodeId)
          Peeks at the content of the node memory for the given node ID.
 void resetAllMemories(org.kie.internal.runtime.StatefulKnowledgeSession session)
           
 void setKnowledgeBaseReference(InternalKnowledgeBase kBase)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConcurrentNodeMemories

public ConcurrentNodeMemories(InternalKnowledgeBase kBase)
Method Detail

clearNodeMemory

public void clearNodeMemory(MemoryFactory node)
Specified by:
clearNodeMemory in interface NodeMemories

clear

public void clear()
Specified by:
clear in interface NodeMemories

resetAllMemories

public void resetAllMemories(org.kie.internal.runtime.StatefulKnowledgeSession session)
Specified by:
resetAllMemories in interface NodeMemories

getNodeMemory

public Memory getNodeMemory(MemoryFactory node,
                            InternalWorkingMemory wm)
The implementation tries to delay locking as much as possible, by running some potentialy unsafe opperations 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:
getNodeMemory in interface NodeMemories

setKnowledgeBaseReference

public void setKnowledgeBaseReference(InternalKnowledgeBase kBase)
Specified by:
setKnowledgeBaseReference in interface NodeMemories

peekNodeMemory

public Memory peekNodeMemory(int nodeId)
Description copied from interface: NodeMemories
Peeks 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:
peekNodeMemory in interface NodeMemories
Returns:

length

public int length()
Description copied from interface: NodeMemories
Returns the number of positions in this memory

Specified by:
length in interface NodeMemories
Returns:

Drools :: Core 6.2.0.CR4

Copyright © 2001-2015 JBoss by Red Hat. All Rights Reserved.