|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.drools.common.BaseNode
public abstract class BaseNode
The base class for all Rete nodes.
Field Summary | |
---|---|
protected boolean |
hasMemory
|
protected int |
id
|
protected int |
sharedCount
|
Constructor Summary | |
---|---|
BaseNode(int id)
All nodes have a unique id, set in the constructor. |
Method Summary | |
---|---|
void |
addShare()
Each time a node is shared a counter is increased. |
abstract void |
attach()
Attaches the node into the network. |
abstract void |
attach(InternalWorkingMemory[] workingMemories)
|
int |
getId()
Returns the unique id that represents the node in the Rete network |
int |
getSharedCount()
Returns the number of times the node is shared |
int |
hashCode()
The hashCode return is simply the unique id of the node. |
boolean |
hasMemory()
Indicates whether the node has any memory. |
boolean |
isInUse()
Returns true in case the current node is in use (is referenced by any other node) |
boolean |
isShared()
Indicates whether the node is shared. |
abstract void |
remove(BaseNode node,
InternalWorkingMemory[] workingMemories)
Removes the node from teh network. |
void |
removeShare()
Each time a node is unshared a counter is decreased. |
protected void |
setHasMemory(boolean hasMemory)
Specifies with the node has any memory. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final int id
protected boolean hasMemory
protected int sharedCount
Constructor Detail |
---|
public BaseNode(int id)
id
- The unique idMethod Detail |
---|
public int getId()
NetworkNode
getId
in interface NetworkNode
protected void setHasMemory(boolean hasMemory)
hasMemory
- public boolean hasMemory()
public abstract void attach()
ObjectSource
or TupleSource
public abstract void attach(InternalWorkingMemory[] workingMemories)
public abstract void remove(BaseNode node, InternalWorkingMemory[] workingMemories)
ObjectSource
or TupleSource
public void addShare()
public void removeShare()
public boolean isShared()
public boolean isInUse()
public int getSharedCount()
public int hashCode()
public String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |