Package org.drools.core.spi
Interface PropagationContext
-
- All Superinterfaces:
Externalizable
,Serializable
- All Known Implementing Classes:
PhreakPropagationContext
public interface PropagationContext extends Externalizable
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
PropagationContext.Type
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PropagationContext
adaptModificationMaskForObjectType(ObjectType type, InternalWorkingMemory workingMemory)
void
cleanReaderContext()
EntryPointId
getEntryPoint()
InternalFactHandle
getFactHandle()
BitMask
getModificationMask()
int
getOriginOffset()
Returns the offset of the fact that initiated this propagation in the current propagation context.long
getPropagationNumber()
MarshallerReaderContext
getReaderContext()
RuleImpl
getRuleOrigin()
TerminalNode
getTerminalNodeOrigin()
PropagationContext.Type
getType()
boolean
isMarshalling()
void
setEntryPoint(EntryPointId entryPoint)
void
setFactHandle(InternalFactHandle factHandle)
void
setMarshalling(boolean marshalling)
void
setModificationMask(BitMask mask)
void
setOriginOffset(int offset)
Sets the origin offset to the given offset.-
Methods inherited from interface java.io.Externalizable
readExternal, writeExternal
-
-
-
-
Method Detail
-
getPropagationNumber
long getPropagationNumber()
-
getType
PropagationContext.Type getType()
-
getRuleOrigin
RuleImpl getRuleOrigin()
-
getTerminalNodeOrigin
TerminalNode getTerminalNodeOrigin()
-
getFactHandle
InternalFactHandle getFactHandle()
- Returns:
- fact handle that was inserted, updated or retracted that created the PropagationContext
-
setFactHandle
void setFactHandle(InternalFactHandle factHandle)
-
getOriginOffset
int getOriginOffset()
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
void setOriginOffset(int offset)
Sets the origin offset to the given offset.- Parameters:
offset
- -1 to unset or from 0 to tuple length-1
-
getEntryPoint
EntryPointId getEntryPoint()
-
getModificationMask
BitMask getModificationMask()
-
adaptModificationMaskForObjectType
PropagationContext adaptModificationMaskForObjectType(ObjectType type, InternalWorkingMemory workingMemory)
-
setModificationMask
void setModificationMask(BitMask mask)
-
getReaderContext
MarshallerReaderContext getReaderContext()
-
cleanReaderContext
void cleanReaderContext()
-
setEntryPoint
void setEntryPoint(EntryPointId entryPoint)
-
isMarshalling
boolean isMarshalling()
-
setMarshalling
void setMarshalling(boolean marshalling)
-
-