org.jactr.core.module.retrieval.six
Class DefaultRetrievalModule6

java.lang.Object
  extended by org.jactr.core.module.AbstractModule
      extended by org.jactr.core.module.retrieval.six.DefaultRetrievalModule6
All Implemented Interfaces:
IModule, IRetrievalModule4, IRetrievalModule, IInitializable, IInstallable, IParameterized

public class DefaultRetrievalModule6
extends AbstractModule
implements IRetrievalModule4, IParameterized


Field Summary
static java.lang.String INDEXED_RETRIEVALS_ENABLED_PARAM
           
static java.lang.String RECENTLY_RETRIEVED_SLOT
           
 
Fields inherited from interface org.jactr.core.module.retrieval.four.IRetrievalModule4
LATENCY_EXPONENT, LATENCY_FACTOR
 
Fields inherited from interface org.jactr.core.module.retrieval.IRetrievalModule
RETRIEVAL_THRESHOLD
 
Constructor Summary
DefaultRetrievalModule6()
           
 
Method Summary
 void addListener(IRetrievalModuleListener listener, java.util.concurrent.Executor executor)
           
 void dispose()
          release any resources.
 double getLatencyExponent()
           
 double getLatencyFactor()
           
 java.lang.String getParameter(java.lang.String key)
          return parameter value - null if not defined.
 java.util.Collection<java.lang.String> getPossibleParameters()
          Return all parameters that can be read
 double getRetrievalThreshold()
           
 IRetrievalTimeEquation getRetrievalTimeEquation()
           
 java.util.Collection<java.lang.String> getSetableParameters()
          Return list of all parameters that can be set.
 void initialize()
          this will be called after all the modules have been installed permitting the module to attach listeners to other modules.
 boolean isIndexedRetrievalEnabled()
           
 void removeListener(IRetrievalModuleListener listener)
           
 void reset()
          reset the module.
 void reset(boolean resetFinsts)
           
 java.util.concurrent.Future<IChunk> retrieveChunk(ChunkTypeRequest chunkPattern)
           
 void setIndexedRetrievalEnabled(boolean enabled)
           
 void setLatencyExponent(double exp)
           
 void setLatencyFactor(double fact)
           
 void setParameter(java.lang.String key, java.lang.String value)
          Set the named parameter
 void setRetrievalThreshold(double threshold)
           
 
Methods inherited from class org.jactr.core.module.AbstractModule
delayedFuture, getExecutor, getModel, getName, immediateFuture, immediateReturn, install, uninstall
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jactr.core.module.IModule
getModel, getName, install
 
Methods inherited from interface org.jactr.core.utils.IInstallable
uninstall
 

Field Detail

INDEXED_RETRIEVALS_ENABLED_PARAM

public static final java.lang.String INDEXED_RETRIEVALS_ENABLED_PARAM
See Also:
Constant Field Values

RECENTLY_RETRIEVED_SLOT

public static final java.lang.String RECENTLY_RETRIEVED_SLOT
See Also:
Constant Field Values
Constructor Detail

DefaultRetrievalModule6

public DefaultRetrievalModule6()
Method Detail

dispose

public void dispose()
Description copied from interface: IModule
release any resources. this should only be called by the model during its own dispose method (assuming that this module is still installed) and should not result in the propogation of ANY events. The module should dispose of all its resources, including buffers

Specified by:
dispose in interface IModule
Overrides:
dispose in class AbstractModule

isIndexedRetrievalEnabled

public boolean isIndexedRetrievalEnabled()

setIndexedRetrievalEnabled

public void setIndexedRetrievalEnabled(boolean enabled)

getRetrievalThreshold

public double getRetrievalThreshold()
Specified by:
getRetrievalThreshold in interface IRetrievalModule

retrieveChunk

public java.util.concurrent.Future<IChunk> retrieveChunk(ChunkTypeRequest chunkPattern)
Specified by:
retrieveChunk in interface IRetrievalModule

setRetrievalThreshold

public void setRetrievalThreshold(double threshold)
Specified by:
setRetrievalThreshold in interface IRetrievalModule

addListener

public void addListener(IRetrievalModuleListener listener,
                        java.util.concurrent.Executor executor)
Specified by:
addListener in interface IRetrievalModule

removeListener

public void removeListener(IRetrievalModuleListener listener)
Specified by:
removeListener in interface IRetrievalModule

initialize

public void initialize()
Description copied from interface: IModule
this will be called after all the modules have been installed permitting the module to attach listeners to other modules. if you want to get access to chunks,types, or productions before the model runs, attach a model listener and do that during the modelStarted call

Specified by:
initialize in interface IModule
Specified by:
initialize in interface IInitializable
Specified by:
initialize in class AbstractModule

getRetrievalTimeEquation

public IRetrievalTimeEquation getRetrievalTimeEquation()
Specified by:
getRetrievalTimeEquation in interface IRetrievalModule

getLatencyExponent

public double getLatencyExponent()
Specified by:
getLatencyExponent in interface IRetrievalModule4

getLatencyFactor

public double getLatencyFactor()
Specified by:
getLatencyFactor in interface IRetrievalModule4

setLatencyExponent

public void setLatencyExponent(double exp)
Specified by:
setLatencyExponent in interface IRetrievalModule4

setLatencyFactor

public void setLatencyFactor(double fact)
Specified by:
setLatencyFactor in interface IRetrievalModule4

getParameter

public java.lang.String getParameter(java.lang.String key)
Description copied from interface: IParameterized
return parameter value - null if not defined.

Specified by:
getParameter in interface IParameterized
Parameters:
key - Description of the Parameter
Returns:
The parameter value
See Also:
IParameterized.getParameter(java.lang.String)

getPossibleParameters

public java.util.Collection<java.lang.String> getPossibleParameters()
Description copied from interface: IParameterized
Return all parameters that can be read

Specified by:
getPossibleParameters in interface IParameterized
Returns:
The possibleParameters value
See Also:
IParameterized.getPossibleParameters()

getSetableParameters

public java.util.Collection<java.lang.String> getSetableParameters()
Description copied from interface: IParameterized
Return list of all parameters that can be set.

Specified by:
getSetableParameters in interface IParameterized
Returns:
The setableParameters value
See Also:
IParameterized.getSetableParameters()

setParameter

public void setParameter(java.lang.String key,
                         java.lang.String value)
Description copied from interface: IParameterized
Set the named parameter

Specified by:
setParameter in interface IParameterized
See Also:
IParameterized.setParameter(java.lang.String, java.lang.String)

reset

public void reset()
Description copied from interface: IModule
reset the module. This will typically clear the owned buffers and abort any module specific operations

Specified by:
reset in interface IModule

reset

public void reset(boolean resetFinsts)
Specified by:
reset in interface IRetrievalModule