Package org.drools.core.common
Class AbstractFactHandleFactory
java.lang.Object
org.drools.core.common.AbstractFactHandleFactory
- All Implemented Interfaces:
FactHandleFactory
- Direct Known Subclasses:
ReteooFactHandleFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear(long id, long counter) createDefaultFactHandle(long id, Object object, long recency, WorkingMemoryEntryPoint entryPoint) createEventFactHandle(long id, Object object, long recency, WorkingMemoryEntryPoint entryPoint, long timestamp, long duration) voiddestroyFactHandle(InternalFactHandle factHandle) voiddoRecycleIds(Collection<Long> usedIds) longgetId()longlonglongprotected WorkingMemoryEntryPointgetWmEntryPoint(ReteEvaluator reteEvaluator, WorkingMemoryEntryPoint wmEntryPoint) final voidincreaseFactHandleRecency(InternalFactHandle factHandle) Increases the recency of the FactHandlefinal InternalFactHandlenewFactHandle(long id, Object object, long recency, ObjectTypeConf conf, ReteEvaluator reteEvaluator, WorkingMemoryEntryPoint wmEntryPoint) final InternalFactHandlenewFactHandle(long id, Object object, ObjectTypeConf conf, ReteEvaluator reteEvaluator, WorkingMemoryEntryPoint wmEntryPoint) final InternalFactHandlenewFactHandle(Object object, ObjectTypeConf conf, ReteEvaluator reteEvaluator, WorkingMemoryEntryPoint wmEntryPoint) Construct a handle with a new id.abstract FactHandleFactoryvoidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.drools.core.rule.accessor.FactHandleFactory
getFactHandleType, newInitialFactHandle, newInstance
-
Constructor Details
-
AbstractFactHandleFactory
public AbstractFactHandleFactory() -
AbstractFactHandleFactory
public AbstractFactHandleFactory(long id, long counter)
-
-
Method Details
-
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
public DefaultFactHandle createDefaultFactHandle(long id, Object object, long recency, WorkingMemoryEntryPoint entryPoint) - Specified by:
createDefaultFactHandlein interfaceFactHandleFactory
-
createEventFactHandle
public DefaultEventHandle createEventFactHandle(long id, Object object, long recency, WorkingMemoryEntryPoint entryPoint, long timestamp, long duration) - Specified by:
createEventFactHandlein interfaceFactHandleFactory
-
getWmEntryPoint
protected WorkingMemoryEntryPoint getWmEntryPoint(ReteEvaluator reteEvaluator, WorkingMemoryEntryPoint wmEntryPoint) -
increaseFactHandleRecency
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
- Specified by:
destroyFactHandlein interfaceFactHandleFactory
-
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
- Specified by:
doRecycleIdsin interfaceFactHandleFactory
-
stopRecycleIds
public void stopRecycleIds()- Specified by:
stopRecycleIdsin interfaceFactHandleFactory
-