|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.drools.common.BaseNode
org.drools.reteoo.ObjectSource
org.drools.reteoo.EntryPointNode
public class EntryPointNode
A node that is an entry point into the Rete network. As we move the design to support network partitions and concurrent processing of parts of the network, we also need to support multiple, independent entry points and this class represents that. It replaces the function of the Rete Node class in previous designs.
ObjectTypeNode
,
Serialized FormField Summary |
---|
Fields inherited from class org.drools.reteoo.ObjectSource |
---|
sink, source |
Fields inherited from class org.drools.common.BaseNode |
---|
associations, id, partitionId, partitionsEnabled |
Constructor Summary | |
---|---|
EntryPointNode()
|
|
EntryPointNode(int id,
ObjectSource objectSource,
BuildContext context)
|
|
EntryPointNode(int id,
RuleBasePartitionId partitionId,
boolean partitionsEnabled,
ObjectSource objectSource,
EntryPoint entryPoint)
|
Method Summary | |
---|---|
void |
addObjectSink(ObjectSink objectSink)
Adds the ObjectSink so that it may receive
Objects propagated from this ObjectSource . |
void |
assertObject(InternalFactHandle factHandle,
PropagationContext context,
InternalWorkingMemory workingMemory)
This is the entry point into the network for all asserted Facts. |
void |
assertObject(InternalFactHandle handle,
PropagationContext context,
ObjectTypeConf objectTypeConf,
InternalWorkingMemory workingMemory)
|
void |
assertQuery(InternalFactHandle factHandle,
PropagationContext context,
InternalWorkingMemory workingMemory)
|
void |
attach()
Attaches the node into the network. |
void |
attach(InternalWorkingMemory[] workingMemories)
|
protected void |
doRemove(RuleRemovalContext context,
ReteooBuilder builder,
BaseNode node,
InternalWorkingMemory[] workingMemories)
Removes the node from teh network. |
boolean |
equals(Object object)
|
EntryPoint |
getEntryPoint()
|
Map<ObjectType,ObjectTypeNode> |
getObjectTypeNodes()
|
int |
hashCode()
The hashCode return is simply the unique id of the node. |
boolean |
isObjectMemoryEnabled()
|
void |
modifyObject(InternalFactHandle factHandle,
ModifyPreviousTuples modifyPreviousTuples,
PropagationContext context,
InternalWorkingMemory workingMemory)
|
void |
modifyObject(InternalFactHandle handle,
PropagationContext context,
ObjectTypeConf objectTypeConf,
InternalWorkingMemory workingMemory)
|
void |
modifyQuery(InternalFactHandle factHandle,
PropagationContext context,
InternalWorkingMemory workingMemory)
|
void |
readExternal(ObjectInput in)
|
protected void |
removeObjectSink(ObjectSink objectSink)
Removes the ObjectSink |
void |
retractObject(InternalFactHandle handle,
PropagationContext context,
ObjectTypeConf objectTypeConf,
InternalWorkingMemory workingMemory)
Retract a fact object from this RuleBase and the specified
WorkingMemory . |
void |
retractQuery(InternalFactHandle factHandle,
PropagationContext context,
InternalWorkingMemory workingMemory)
|
void |
setObjectMemoryEnabled(boolean objectMemoryEnabled)
|
String |
toString()
|
void |
updateSink(ObjectSink sink,
PropagationContext context,
InternalWorkingMemory workingMemory)
|
void |
writeExternal(ObjectOutput out)
|
Methods inherited from class org.drools.reteoo.ObjectSource |
---|
getParentObjectSource, getSinkPropagator, isInUse, networkUpdated |
Methods inherited from class org.drools.common.BaseNode |
---|
addAssociation, getAssociations, getId, getPartitionId, remove, removeAssociation, setPartitionId |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.drools.common.NetworkNode |
---|
getId, getPartitionId |
Constructor Detail |
---|
public EntryPointNode()
public EntryPointNode(int id, ObjectSource objectSource, BuildContext context)
public EntryPointNode(int id, RuleBasePartitionId partitionId, boolean partitionsEnabled, ObjectSource objectSource, EntryPoint entryPoint)
Method Detail |
---|
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
readExternal
in class ObjectSource
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class ObjectSource
IOException
public EntryPoint getEntryPoint()
public void assertQuery(InternalFactHandle factHandle, PropagationContext context, InternalWorkingMemory workingMemory)
public void retractQuery(InternalFactHandle factHandle, PropagationContext context, InternalWorkingMemory workingMemory)
public void modifyQuery(InternalFactHandle factHandle, PropagationContext context, InternalWorkingMemory workingMemory)
public void assertObject(InternalFactHandle handle, PropagationContext context, ObjectTypeConf objectTypeConf, InternalWorkingMemory workingMemory)
public void modifyObject(InternalFactHandle handle, PropagationContext context, ObjectTypeConf objectTypeConf, InternalWorkingMemory workingMemory)
public void modifyObject(InternalFactHandle factHandle, ModifyPreviousTuples modifyPreviousTuples, PropagationContext context, InternalWorkingMemory workingMemory)
modifyObject
in interface ObjectSink
public void assertObject(InternalFactHandle factHandle, PropagationContext context, InternalWorkingMemory workingMemory)
ObjectTypdeNode
s asserting the Fact. If the cache does not
exist it first iterates and builds the cache.
assertObject
in interface ObjectSink
factHandle
- The FactHandle of the fact to assertcontext
- The PropagationContext
of the WorkingMemory
actionworkingMemory
- The working memory session.public void retractObject(InternalFactHandle handle, PropagationContext context, ObjectTypeConf objectTypeConf, InternalWorkingMemory workingMemory)
RuleBase
and the specified
WorkingMemory
.
handle
- The handle of the fact to retract.workingMemory
- The working memory session.public void addObjectSink(ObjectSink objectSink)
ObjectSink
so that it may receive
Objects
propagated from this ObjectSource
.
addObjectSink
in class ObjectSource
objectSink
- The ObjectSink
to receive propagated
Objects
. Rete only accepts ObjectTypeNode
s
as parameters to this method, though.protected void removeObjectSink(ObjectSink objectSink)
ObjectSource
ObjectSink
removeObjectSink
in class ObjectSource
objectSink
- The ObjectSink
to removepublic void attach()
BaseNode
ObjectSource
or TupleSource
attach
in class BaseNode
public void attach(InternalWorkingMemory[] workingMemories)
attach
in class BaseNode
protected void doRemove(RuleRemovalContext context, ReteooBuilder builder, BaseNode node, InternalWorkingMemory[] workingMemories)
BaseNode
ObjectSource
or TupleSource
doRemove
in class ObjectSource
public Map<ObjectType,ObjectTypeNode> getObjectTypeNodes()
public int hashCode()
BaseNode
hashCode
in class BaseNode
public boolean equals(Object object)
equals
in class Object
public void updateSink(ObjectSink sink, PropagationContext context, InternalWorkingMemory workingMemory)
updateSink
in class ObjectSource
public boolean isObjectMemoryEnabled()
public void setObjectMemoryEnabled(boolean objectMemoryEnabled)
public String toString()
toString
in class BaseNode
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |