Package org.drools.core.common
Class PhreakPropagationContext
- java.lang.Object
-
- org.drools.core.common.PhreakPropagationContext
-
- All Implemented Interfaces:
Externalizable,Serializable,PropagationContext
public class PhreakPropagationContext extends Object implements PropagationContext
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.drools.core.spi.PropagationContext
PropagationContext.Type
-
-
Constructor Summary
Constructors Constructor Description PhreakPropagationContext()PhreakPropagationContext(long number, PropagationContext.Type type, RuleImpl rule, TerminalNode terminalNode, InternalFactHandle factHandle)PhreakPropagationContext(long number, PropagationContext.Type type, RuleImpl rule, TerminalNode terminalNode, InternalFactHandle factHandle, EntryPointId entryPoint)PhreakPropagationContext(long number, PropagationContext.Type type, RuleImpl rule, TerminalNode terminalNode, InternalFactHandle factHandle, EntryPointId entryPoint, MarshallerReaderContext readerContext)PhreakPropagationContext(long number, PropagationContext.Type type, RuleImpl rule, TerminalNode terminalNode, InternalFactHandle factHandle, EntryPointId entryPoint, BitMask modificationMask, Class<?> modifiedClass, MarshallerReaderContext readerContext)
-
Method Summary
-
-
-
Constructor Detail
-
PhreakPropagationContext
public PhreakPropagationContext()
-
PhreakPropagationContext
public PhreakPropagationContext(long number, PropagationContext.Type type, RuleImpl rule, TerminalNode terminalNode, InternalFactHandle factHandle)
-
PhreakPropagationContext
public PhreakPropagationContext(long number, PropagationContext.Type type, RuleImpl rule, TerminalNode terminalNode, InternalFactHandle factHandle, EntryPointId entryPoint)
-
PhreakPropagationContext
public PhreakPropagationContext(long number, PropagationContext.Type type, RuleImpl rule, TerminalNode terminalNode, InternalFactHandle factHandle, EntryPointId entryPoint, MarshallerReaderContext readerContext)
-
PhreakPropagationContext
public PhreakPropagationContext(long number, PropagationContext.Type type, RuleImpl rule, TerminalNode terminalNode, InternalFactHandle factHandle, EntryPointId entryPoint, BitMask modificationMask, Class<?> modifiedClass, MarshallerReaderContext readerContext)
-
-
Method Detail
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
getPropagationNumber
public long getPropagationNumber()
- Specified by:
getPropagationNumberin interfacePropagationContext
-
cleanReaderContext
public void cleanReaderContext()
- Specified by:
cleanReaderContextin interfacePropagationContext
-
getRuleOrigin
public RuleImpl getRuleOrigin()
- Specified by:
getRuleOriginin interfacePropagationContext
-
getTerminalNodeOrigin
public TerminalNode getTerminalNodeOrigin()
- Specified by:
getTerminalNodeOriginin interfacePropagationContext
-
getFactHandle
public InternalFactHandle getFactHandle()
- Specified by:
getFactHandlein interfacePropagationContext- Returns:
- fact handle that was inserted, updated or retracted that created the PropagationContext
-
setFactHandle
public void setFactHandle(InternalFactHandle factHandle)
- Specified by:
setFactHandlein interfacePropagationContext
-
getType
public PropagationContext.Type getType()
- Specified by:
getTypein interfacePropagationContext
-
getEntryPoint
public EntryPointId getEntryPoint()
- Specified by:
getEntryPointin interfacePropagationContext- Returns:
- the entryPoint
-
setEntryPoint
public void setEntryPoint(EntryPointId entryPoint)
- Specified by:
setEntryPointin interfacePropagationContext- Parameters:
entryPoint- the entryPoint to set
-
getOriginOffset
public int getOriginOffset()
Description copied from interface:PropagationContextReturns 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.- Specified by:
getOriginOffsetin interfacePropagationContext- Returns:
- -1 for not set, and from 0 to the tuple length-1.
-
setOriginOffset
public void setOriginOffset(int originOffset)
Description copied from interface:PropagationContextSets the origin offset to the given offset.- Specified by:
setOriginOffsetin interfacePropagationContext- Parameters:
originOffset- -1 to unset or from 0 to tuple length-1
-
getModificationMask
public BitMask getModificationMask()
- Specified by:
getModificationMaskin interfacePropagationContext
-
setModificationMask
public void setModificationMask(BitMask modificationMask)
- Specified by:
setModificationMaskin interfacePropagationContext
-
adaptModificationMaskForObjectType
public PropagationContext adaptModificationMaskForObjectType(ObjectType type, ReteEvaluator reteEvaluator)
- Specified by:
adaptModificationMaskForObjectTypein interfacePropagationContext
-
getReaderContext
public MarshallerReaderContext getReaderContext()
- Specified by:
getReaderContextin interfacePropagationContext
-
isMarshalling
public boolean isMarshalling()
- Specified by:
isMarshallingin interfacePropagationContext
-
setMarshalling
public void setMarshalling(boolean marshalling)
- Specified by:
setMarshallingin interfacePropagationContext
-
intEnumToString
public static String intEnumToString(PropagationContext pctx)
-
-