org.drools.common
Class AbstractFactHandleFactory

java.lang.Object
  extended by org.drools.common.AbstractFactHandleFactory
All Implemented Interfaces:
FactHandleFactory
Direct Known Subclasses:
Jsr94FactHandleFactory, ReteooFactHandleFactory

public abstract class AbstractFactHandleFactory
extends Object
implements FactHandleFactory


Constructor Summary
AbstractFactHandleFactory()
           
AbstractFactHandleFactory(int id, long counter)
           
 
Method Summary
 void clear(int id, long counter)
           
 void destroyFactHandle(InternalFactHandle factHandle)
           
 AtomicInteger getAtomicId()
           
 AtomicLong getAtomicRecency()
           
 int getId()
           
 long getRecency()
           
 void increaseFactHandleRecency(InternalFactHandle factHandle)
          Increases the recency of the FactHandle
protected abstract  InternalFactHandle newFactHandle(int id, Object object, long recency, ObjectTypeConf conf, InternalWorkingMemory workingMemory, org.drools.runtime.rule.WorkingMemoryEntryPoint wmEntryPoint)
           
protected  InternalFactHandle newFactHandle(int id, Object object, ObjectTypeConf conf, InternalWorkingMemory workingMemory, org.drools.runtime.rule.WorkingMemoryEntryPoint wmEntryPoint)
           
 InternalFactHandle newFactHandle(Object object, ObjectTypeConf conf, InternalWorkingMemory workingMemory, org.drools.runtime.rule.WorkingMemoryEntryPoint wmEntryPoint)
          Construct a handle with a new id.
abstract  FactHandleFactory newInstance()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.drools.spi.FactHandleFactory
getFactHandleType, newInstance
 

Constructor Detail

AbstractFactHandleFactory

public AbstractFactHandleFactory()

AbstractFactHandleFactory

public AbstractFactHandleFactory(int id,
                                 long counter)
Method Detail

newFactHandle

public final InternalFactHandle newFactHandle(Object object,
                                              ObjectTypeConf conf,
                                              InternalWorkingMemory workingMemory,
                                              org.drools.runtime.rule.WorkingMemoryEntryPoint wmEntryPoint)
Description copied from interface: FactHandleFactory
Construct a handle with a new id.

Specified by:
newFactHandle in interface FactHandleFactory
Returns:
The handle.

newFactHandle

protected final InternalFactHandle newFactHandle(int id,
                                                 Object object,
                                                 ObjectTypeConf conf,
                                                 InternalWorkingMemory workingMemory,
                                                 org.drools.runtime.rule.WorkingMemoryEntryPoint wmEntryPoint)

newFactHandle

protected abstract InternalFactHandle newFactHandle(int id,
                                                    Object object,
                                                    long recency,
                                                    ObjectTypeConf conf,
                                                    InternalWorkingMemory workingMemory,
                                                    org.drools.runtime.rule.WorkingMemoryEntryPoint wmEntryPoint)

increaseFactHandleRecency

public final void increaseFactHandleRecency(InternalFactHandle factHandle)
Description copied from interface: FactHandleFactory
Increases the recency of the FactHandle

Specified by:
increaseFactHandleRecency in interface FactHandleFactory
Parameters:
factHandle - The fact handle to have its recency increased.

destroyFactHandle

public void destroyFactHandle(InternalFactHandle factHandle)
Specified by:
destroyFactHandle in interface FactHandleFactory

newInstance

public abstract FactHandleFactory newInstance()
Specified by:
newInstance in interface FactHandleFactory
Returns:
a fresh instance of the fact handle factory, with any IDs reset etc.

getAtomicId

public AtomicInteger getAtomicId()
Specified by:
getAtomicId in interface FactHandleFactory

getAtomicRecency

public AtomicLong getAtomicRecency()
Specified by:
getAtomicRecency in interface FactHandleFactory

getId

public int getId()
Specified by:
getId in interface FactHandleFactory

getRecency

public long getRecency()
Specified by:
getRecency in interface FactHandleFactory

clear

public void clear(int id,
                  long counter)
Specified by:
clear in interface FactHandleFactory


Copyright © 2001-2013 JBoss Inc.. All Rights Reserved.