Package org.drools.core.common
Class AbstractFactHandleFactory
- java.lang.Object
-
- org.drools.core.common.AbstractFactHandleFactory
-
- All Implemented Interfaces:
FactHandleFactory
- Direct Known Subclasses:
ReteooFactHandleFactory
public abstract class AbstractFactHandleFactory extends Object implements FactHandleFactory
-
-
Constructor Summary
Constructors Constructor Description AbstractFactHandleFactory()AbstractFactHandleFactory(long id, long counter)
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.drools.core.rule.accessor.FactHandleFactory
getFactHandleType, newInitialFactHandle, newInstance
-
-
-
-
Method Detail
-
newFactHandle
public final InternalFactHandle newFactHandle(Object object, ObjectTypeConf conf, ReteEvaluator reteEvaluator, WorkingMemoryEntryPoint wmEntryPoint)
Description copied from interface:FactHandleFactoryConstruct a handle with a new id.- Specified by:
newFactHandlein interfaceFactHandleFactory- Returns:
- The handle.
-
newFactHandle
public final InternalFactHandle newFactHandle(long id, Object object, ObjectTypeConf conf, ReteEvaluator reteEvaluator, WorkingMemoryEntryPoint wmEntryPoint)
-
newFactHandle
public final InternalFactHandle newFactHandle(long id, Object object, long recency, ObjectTypeConf conf, ReteEvaluator reteEvaluator, WorkingMemoryEntryPoint wmEntryPoint)
- Specified by:
newFactHandlein interfaceFactHandleFactory
-
createDefaultFactHandle
protected DefaultFactHandle createDefaultFactHandle(long id, Object object, long recency, WorkingMemoryEntryPoint entryPoint)
-
createEventFactHandle
protected EventFactHandle createEventFactHandle(long id, Object object, long recency, WorkingMemoryEntryPoint entryPoint, long timestamp, long duration)
-
getWmEntryPoint
protected WorkingMemoryEntryPoint getWmEntryPoint(ReteEvaluator reteEvaluator, WorkingMemoryEntryPoint wmEntryPoint)
-
increaseFactHandleRecency
public final void increaseFactHandleRecency(InternalFactHandle factHandle)
Description copied from interface:FactHandleFactoryIncreases the recency of the FactHandle- Specified by:
increaseFactHandleRecencyin interfaceFactHandleFactory- Parameters:
factHandle- The fact handle to have its recency increased.
-
destroyFactHandle
public void destroyFactHandle(InternalFactHandle factHandle)
- Specified by:
destroyFactHandlein interfaceFactHandleFactory
-
newInstance
public abstract FactHandleFactory newInstance()
- Specified by:
newInstancein interfaceFactHandleFactory- Returns:
- a fresh instance of the fact handle factory, with any IDs reset etc.
-
getNextId
public long getNextId()
- Specified by:
getNextIdin interfaceFactHandleFactory
-
getNextRecency
public long getNextRecency()
- Specified by:
getNextRecencyin interfaceFactHandleFactory
-
getId
public long getId()
- Specified by:
getIdin interfaceFactHandleFactory
-
getRecency
public long getRecency()
- Specified by:
getRecencyin interfaceFactHandleFactory
-
clear
public void clear(long id, long counter)- Specified by:
clearin interfaceFactHandleFactory
-
doRecycleIds
public void doRecycleIds(Collection<Long> usedIds)
- Specified by:
doRecycleIdsin interfaceFactHandleFactory
-
stopRecycleIds
public void stopRecycleIds()
- Specified by:
stopRecycleIdsin interfaceFactHandleFactory
-
-