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
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
clear(long id, long counter)
void
destroyFactHandle(InternalFactHandle factHandle)
void
doRecycleIds(Collection<Long> usedIds)
long
getId()
long
getNextId()
long
getNextRecency()
long
getRecency()
void
increaseFactHandleRecency(InternalFactHandle factHandle)
Increases the recency of the FactHandleabstract InternalFactHandle
newFactHandle(long id, Object object, long recency, ObjectTypeConf conf, InternalWorkingMemory workingMemory, WorkingMemoryEntryPoint wmEntryPoint)
InternalFactHandle
newFactHandle(long id, Object object, ObjectTypeConf conf, InternalWorkingMemory workingMemory, WorkingMemoryEntryPoint wmEntryPoint)
InternalFactHandle
newFactHandle(Object object, ObjectTypeConf conf, InternalWorkingMemory workingMemory, WorkingMemoryEntryPoint wmEntryPoint)
Construct a handle with a new id.abstract FactHandleFactory
newInstance()
void
stopRecycleIds()
-
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.spi.FactHandleFactory
createDefaultFactHandle, getFactHandleType, newInstance
-
-
-
-
Method Detail
-
newFactHandle
public final InternalFactHandle newFactHandle(Object object, ObjectTypeConf conf, InternalWorkingMemory workingMemory, WorkingMemoryEntryPoint wmEntryPoint)
Description copied from interface:FactHandleFactory
Construct a handle with a new id.- Specified by:
newFactHandle
in interfaceFactHandleFactory
- Returns:
- The handle.
-
newFactHandle
public final InternalFactHandle newFactHandle(long id, Object object, ObjectTypeConf conf, InternalWorkingMemory workingMemory, WorkingMemoryEntryPoint wmEntryPoint)
-
newFactHandle
public abstract InternalFactHandle newFactHandle(long id, Object object, long recency, ObjectTypeConf conf, InternalWorkingMemory workingMemory, WorkingMemoryEntryPoint wmEntryPoint)
- Specified by:
newFactHandle
in interfaceFactHandleFactory
-
increaseFactHandleRecency
public final void increaseFactHandleRecency(InternalFactHandle factHandle)
Description copied from interface:FactHandleFactory
Increases the recency of the FactHandle- Specified by:
increaseFactHandleRecency
in interfaceFactHandleFactory
- Parameters:
factHandle
- The fact handle to have its recency increased.
-
destroyFactHandle
public void destroyFactHandle(InternalFactHandle factHandle)
- Specified by:
destroyFactHandle
in interfaceFactHandleFactory
-
newInstance
public abstract FactHandleFactory newInstance()
- Specified by:
newInstance
in interfaceFactHandleFactory
- Returns:
- a fresh instance of the fact handle factory, with any IDs reset etc.
-
getNextId
public long getNextId()
- Specified by:
getNextId
in interfaceFactHandleFactory
-
getNextRecency
public long getNextRecency()
- Specified by:
getNextRecency
in interfaceFactHandleFactory
-
getId
public long getId()
- Specified by:
getId
in interfaceFactHandleFactory
-
getRecency
public long getRecency()
- Specified by:
getRecency
in interfaceFactHandleFactory
-
clear
public void clear(long id, long counter)
- Specified by:
clear
in interfaceFactHandleFactory
-
doRecycleIds
public void doRecycleIds(Collection<Long> usedIds)
- Specified by:
doRecycleIds
in interfaceFactHandleFactory
-
stopRecycleIds
public void stopRecycleIds()
- Specified by:
stopRecycleIds
in interfaceFactHandleFactory
-
-