Drools :: Core 6.0.0.Beta5

org.drools.core.common
Class PropagationContextImpl

java.lang.Object
  extended by org.drools.core.common.PropagationContextImpl
All Implemented Interfaces:
Externalizable, Serializable, org.kie.api.runtime.rule.PropagationContext

public class PropagationContextImpl
extends Object
implements PropagationContext

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.kie.api.runtime.rule.PropagationContext
DELETION, EXPIRATION, INSERTION, MODIFICATION, RULE_ADDITION, RULE_REMOVAL, typeDescr
 
Constructor Summary
PropagationContextImpl()
           
PropagationContextImpl(long number, int type, Rule rule, LeftTuple leftTuple, InternalFactHandle factHandle)
           
PropagationContextImpl(long number, int type, Rule rule, LeftTuple leftTuple, InternalFactHandle factHandle, EntryPoint entryPoint)
           
PropagationContextImpl(long number, int type, Rule rule, LeftTuple leftTuple, InternalFactHandle factHandle, EntryPoint entryPoint, long modificationMask, Class<?> modifiedClass, MarshallerReaderContext readerContext)
           
PropagationContextImpl(long number, int type, Rule rule, LeftTuple leftTuple, InternalFactHandle factHandle, EntryPoint entryPoint, MarshallerReaderContext readerContext)
           
PropagationContextImpl(long number, int type, Rule rule, LeftTuple leftTuple, InternalFactHandle factHandle, int activeActivations, int dormantActivations, EntryPoint entryPoint, long modificationMask)
           
 
Method Summary
 PropagationContext adaptModificationMaskForObjectType(ObjectType type, InternalWorkingMemory workingMemory)
           
 void addInsertAction(WorkingMemoryAction action)
           
 void cleanReaderContext()
           
 void evaluateActionQueue(InternalWorkingMemory workingMemory)
           
 EntryPoint getEntryPoint()
           
 FactHandle getFactHandle()
           
 InternalFactHandle getFactHandleOrigin()
           
 LeftTuple getLeftTupleOrigin()
           
 long getModificationMask()
           
 ObjectType getObjectType()
           
 int getOriginOffset()
          Returns the offset of the fact that initiated this propagation in the current propagation context.
 long getPropagationNumber()
           
 LinkedList<WorkingMemoryAction> getQueue1()
           
 LinkedList<WorkingMemoryAction> getQueue2()
           
 MarshallerReaderContext getReaderContext()
           
 org.kie.api.definition.rule.Rule getRule()
           
 Rule getRuleOrigin()
           
 int getType()
           
static String intEnumToString(PropagationContext pctx)
           
 void readExternal(ObjectInput in)
           
 void releaseResources()
           
 void removeInsertAction(WorkingMemoryAction action)
           
 void setEntryPoint(EntryPoint entryPoint)
           
 void setFactHandle(FactHandle factHandle)
           
 void setFactHandle(InternalFactHandle factHandle)
           
 void setObjectType(ObjectType objectType)
           
 void setOriginOffset(int originOffset)
          Sets the origin offset to the given offset.
 String toString()
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PropagationContextImpl

public PropagationContextImpl()

PropagationContextImpl

public PropagationContextImpl(long number,
                              int type,
                              Rule rule,
                              LeftTuple leftTuple,
                              InternalFactHandle factHandle)

PropagationContextImpl

public PropagationContextImpl(long number,
                              int type,
                              Rule rule,
                              LeftTuple leftTuple,
                              InternalFactHandle factHandle,
                              EntryPoint entryPoint)

PropagationContextImpl

public PropagationContextImpl(long number,
                              int type,
                              Rule rule,
                              LeftTuple leftTuple,
                              InternalFactHandle factHandle,
                              int activeActivations,
                              int dormantActivations,
                              EntryPoint entryPoint,
                              long modificationMask)

PropagationContextImpl

public PropagationContextImpl(long number,
                              int type,
                              Rule rule,
                              LeftTuple leftTuple,
                              InternalFactHandle factHandle,
                              EntryPoint entryPoint,
                              MarshallerReaderContext readerContext)

PropagationContextImpl

public PropagationContextImpl(long number,
                              int type,
                              Rule rule,
                              LeftTuple leftTuple,
                              InternalFactHandle factHandle,
                              EntryPoint entryPoint,
                              long modificationMask,
                              Class<?> modifiedClass,
                              MarshallerReaderContext readerContext)
Method Detail

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

getPropagationNumber

public long getPropagationNumber()
Specified by:
getPropagationNumber in interface org.kie.api.runtime.rule.PropagationContext

cleanReaderContext

public void cleanReaderContext()

getRuleOrigin

public Rule getRuleOrigin()

getRule

public org.kie.api.definition.rule.Rule getRule()
Specified by:
getRule in interface org.kie.api.runtime.rule.PropagationContext

getLeftTupleOrigin

public LeftTuple getLeftTupleOrigin()

getFactHandleOrigin

public InternalFactHandle getFactHandleOrigin()

getFactHandle

public FactHandle getFactHandle()
Specified by:
getFactHandle in interface org.kie.api.runtime.rule.PropagationContext

setFactHandle

public void setFactHandle(FactHandle factHandle)

getType

public int getType()
Specified by:
getType in interface org.kie.api.runtime.rule.PropagationContext

releaseResources

public void releaseResources()

getEntryPoint

public EntryPoint getEntryPoint()
Returns:
the entryPoint

setEntryPoint

public void setEntryPoint(EntryPoint entryPoint)
Parameters:
entryPoint - the entryPoint to set

setFactHandle

public void setFactHandle(InternalFactHandle factHandle)

getOriginOffset

public int getOriginOffset()
Description copied from interface: PropagationContext
Returns the offset of the fact that initiated this propagation in the current propagation context. This attribute is mutable as the same fact might have different offsets in different rules or logical branches.

Returns:
-1 for not set, and from 0 to the tuple length-1.

setOriginOffset

public void setOriginOffset(int originOffset)
Description copied from interface: PropagationContext
Sets the origin offset to the given offset.

Parameters:
originOffset - -1 to unset or from 0 to tuple length-1

addInsertAction

public void addInsertAction(WorkingMemoryAction action)

removeInsertAction

public void removeInsertAction(WorkingMemoryAction action)

getQueue1

public LinkedList<WorkingMemoryAction> getQueue1()

getQueue2

public LinkedList<WorkingMemoryAction> getQueue2()

evaluateActionQueue

public void evaluateActionQueue(InternalWorkingMemory workingMemory)

getModificationMask

public long getModificationMask()

adaptModificationMaskForObjectType

public PropagationContext adaptModificationMaskForObjectType(ObjectType type,
                                                             InternalWorkingMemory workingMemory)

getObjectType

public ObjectType getObjectType()

setObjectType

public void setObjectType(ObjectType objectType)

getReaderContext

public MarshallerReaderContext getReaderContext()

intEnumToString

public static String intEnumToString(PropagationContext pctx)

toString

public String toString()
Overrides:
toString in class Object

Drools :: Core 6.0.0.Beta5

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