org.jactr.core.module.asynch
Interface IAsynchronousModule

All Superinterfaces:
IInitializable, IInstallable, IModule
All Known Subinterfaces:
IAuralModule, IMotorModule, IPerceptualMemoryModule, IPerceptualModule, IVisualModule, IVocalModule
All Known Implementing Classes:
AbstractAsynchronousModule, AbstractAuralModule, AbstractMotorModule, AbstractPerceptualModule, AbstractVisualModule, AbstractVocalModule, DefaultAuralModule6, DefaultMotorModule6, DefaultVisualModule6, DefaultVocalModule6

public interface IAsynchronousModule
extends IModule


Field Summary
static java.lang.String STRICT_SYNCHRONIZATION_PARAM
           
 
Method Summary
 java.util.concurrent.Executor getExecutor()
           
 boolean isStrictSynchronizationEnabled()
           
 void setStrictSynchronizationEnabled(boolean enableStrict)
           
 BlockingTimedEvent synchronizedTimedEvent(double startTime, double blockAtTime)
          create a new synchronization point.
 
Methods inherited from interface org.jactr.core.module.IModule
dispose, getModel, getName, initialize, install, reset
 
Methods inherited from interface org.jactr.core.utils.IInstallable
uninstall
 

Field Detail

STRICT_SYNCHRONIZATION_PARAM

static final java.lang.String STRICT_SYNCHRONIZATION_PARAM
See Also:
Constant Field Values
Method Detail

getExecutor

java.util.concurrent.Executor getExecutor()

isStrictSynchronizationEnabled

boolean isStrictSynchronizationEnabled()

setStrictSynchronizationEnabled

void setStrictSynchronizationEnabled(boolean enableStrict)

synchronizedTimedEvent

BlockingTimedEvent synchronizedTimedEvent(double startTime,
                                          double blockAtTime)
create a new synchronization point. This synchronization point will block the model from further firing at blockAtTime. The block will not be released until BlockingTimedEvent.abort() is called.

If isStrictSynchronizationEnabled() is true, the event will be created and queued. If false, the event will be created, immediately aborted, and not queued.

This behavior was decided upon so that the module code need not concern itself with isStrictSynchronizationEnabled() at all. Modules that wish to synchronize should just create the BlockingTimedEvent via this call and make their module request. Upon completion of the request, the block is aborted.

Parameters:
startTime -
blockAtTime -
Returns: