org.jactr.modules.pm.common.buffer
Class AbstractCapacityPMActivationBuffer6

java.lang.Object
  extended by org.jactr.core.buffer.AbstractActivationBuffer
      extended by org.jactr.core.buffer.six.AbstractActivationBuffer6
          extended by org.jactr.core.buffer.six.AbstractRequestableBuffer6
              extended by org.jactr.core.buffer.six.AbstractCapacityBuffer6
                  extended by org.jactr.modules.pm.common.buffer.AbstractCapacityPMActivationBuffer6
All Implemented Interfaces:
IDelegatedRequestableBuffer, IActivationBuffer, ICapacityBuffer, IRequestableBuffer, IStatusBuffer, ICompilableBuffer, ISlotContainer, IUniqueSlotContainer, IInitializable, IParameterized, IEventTrackingActivationBuffer, IPerceptualBuffer

public abstract class AbstractCapacityPMActivationBuffer6
extends AbstractCapacityBuffer6
implements IDelegatedRequestableBuffer, IPerceptualBuffer, IEventTrackingActivationBuffer, ICompilableBuffer

Author:
developer

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jactr.core.buffer.ICapacityBuffer
ICapacityBuffer.EjectionPolicy
 
Field Summary
 
Fields inherited from class org.jactr.core.buffer.AbstractActivationBuffer
ACTIVATION_PARAM, GOAL_VALUE_PARAM, STRICT_HARVESTING_PARAM
 
Fields inherited from interface org.jactr.modules.pm.buffer.IPerceptualBuffer
EXECUTION_SLOT, IS_BUFFER_STUFF_REQUEST, MODALITY_SLOT, PREPARATION_SLOT, PROCESSOR_SLOT
 
Fields inherited from interface org.jactr.core.buffer.six.IStatusBuffer
BUFFER_SLOT, STATE_SLOT
 
Fields inherited from interface org.jactr.core.buffer.ICapacityBuffer
EJECTION_POLICY_PARAM
 
Constructor Summary
AbstractCapacityPMActivationBuffer6(java.lang.String name, IModule module)
           
 
Method Summary
 void addRequestDelegate(IRequestDelegate processor)
           
 void clear()
          will call removeSourceChunkInternal for all the chunks and then recalculate activation
 void dispose()
          clean up resources, called by the module that created the buffer
 void enqueueTimedEvent(ITimedEvent timedEvent)
          called when we want to queue a timed event onto the model's event queue this also tracks all the pending events so that if they fire or get aborted we are notified, and it permits us to abort when a clear is called
 ICompilableContext getCompilableContext()
           
 java.util.Collection<IRequestDelegate> getRequestDelegates()
          returns the actual backing collection
 void initialize()
          must be called after the model has started so that we can ensure that the status slot values are properly initialized
 boolean isExecutionBusy()
           
 boolean isExecutionFree()
           
 boolean isModalityBusy()
           
 boolean isModalityFree()
           
 boolean isPreparationBusy()
           
 boolean isPreparationFree()
           
 boolean isProcessorBusy()
           
 boolean isProcessorFree()
           
 void removeRequestDelegate(IRequestDelegate processor)
           
 void setExecutionChunk(IChunk chunk)
           
 void setModalityChunk(IChunk chunk)
           
 void setPreparationChunk(IChunk chunk)
           
 void setProcessorChunk(IChunk chunk)
           
 boolean willAccept(IRequest request)
          return true if this buffer would accept this request
 
Methods inherited from class org.jactr.core.buffer.six.AbstractCapacityBuffer6
getEjectionPolicy, getParameter, getPossibleParameters, getSetableParameters, setEjectionPolicy, setParameter
 
Methods inherited from class org.jactr.core.buffer.six.AbstractRequestableBuffer6
request
 
Methods inherited from class org.jactr.core.buffer.six.AbstractActivationBuffer6
addSlot, addSourceChunk, bind, getBusyChunk, getEmptyChunk, getErrorChunk, getFreeChunk, getFullChunk, getRequestedChunk, getSlot, getSlots, getSlots, getUnrequestedChunk, isBufferEmpty, isBufferFull, isBufferRequested, isBufferUnrequested, isStateBusy, isStateError, isStateFree, removeSlot, setBufferChunk, setStateChunk
 
Methods inherited from class org.jactr.core.buffer.AbstractActivationBuffer
addListener, contains, getActivation, getActivationSpreader, getG, getModel, getModule, getName, getSourceChunk, getSourceChunks, getSourceChunks, handlesEncoding, isStrictHarvestingEnabled, matched, removeListener, removeSourceChunk, setActivation, setActivationSpreader, setG, setStrictHarvestingEnabled, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jactr.core.buffer.six.IStatusBuffer
bind, isBufferEmpty, isBufferFull, isBufferRequested, isBufferUnrequested, isStateBusy, isStateError, isStateFree, setBufferChunk, setStateChunk
 
Methods inherited from interface org.jactr.core.slot.IUniqueSlotContainer
getSlot
 
Methods inherited from interface org.jactr.core.slot.ISlotContainer
addSlot, getSlots, getSlots, removeSlot
 
Methods inherited from interface org.jactr.core.buffer.ICapacityBuffer
getSourceChunks
 

Constructor Detail

AbstractCapacityPMActivationBuffer6

public AbstractCapacityPMActivationBuffer6(java.lang.String name,
                                           IModule module)
Method Detail

dispose

public void dispose()
Description copied from interface: IActivationBuffer
clean up resources, called by the module that created the buffer

Specified by:
dispose in interface IActivationBuffer
Overrides:
dispose in class AbstractCapacityBuffer6

initialize

public void initialize()
Description copied from class: AbstractActivationBuffer6
must be called after the model has started so that we can ensure that the status slot values are properly initialized

Specified by:
initialize in interface IInitializable
Overrides:
initialize in class AbstractCapacityBuffer6

clear

public void clear()
Description copied from class: AbstractActivationBuffer
will call removeSourceChunkInternal for all the chunks and then recalculate activation

Specified by:
clear in interface IActivationBuffer
Overrides:
clear in class AbstractActivationBuffer
See Also:
IActivationBuffer.clear()

enqueueTimedEvent

public void enqueueTimedEvent(ITimedEvent timedEvent)
called when we want to queue a timed event onto the model's event queue this also tracks all the pending events so that if they fire or get aborted we are notified, and it permits us to abort when a clear is called

Specified by:
enqueueTimedEvent in interface IEventTrackingActivationBuffer
Parameters:
timedEvent -

addRequestDelegate

public void addRequestDelegate(IRequestDelegate processor)
Specified by:
addRequestDelegate in interface IDelegatedRequestableBuffer

removeRequestDelegate

public void removeRequestDelegate(IRequestDelegate processor)
Specified by:
removeRequestDelegate in interface IDelegatedRequestableBuffer

getRequestDelegates

public java.util.Collection<IRequestDelegate> getRequestDelegates()
returns the actual backing collection

Specified by:
getRequestDelegates in interface IDelegatedRequestableBuffer
Returns:

willAccept

public boolean willAccept(IRequest request)
Description copied from interface: IRequestableBuffer
return true if this buffer would accept this request

Specified by:
willAccept in interface IRequestableBuffer
Returns:

isModalityFree

public boolean isModalityFree()
Specified by:
isModalityFree in interface IPerceptualBuffer

isProcessorFree

public boolean isProcessorFree()
Specified by:
isProcessorFree in interface IPerceptualBuffer

isPreparationFree

public boolean isPreparationFree()
Specified by:
isPreparationFree in interface IPerceptualBuffer

isExecutionFree

public boolean isExecutionFree()
Specified by:
isExecutionFree in interface IPerceptualBuffer

isModalityBusy

public boolean isModalityBusy()
Specified by:
isModalityBusy in interface IPerceptualBuffer

isProcessorBusy

public boolean isProcessorBusy()
Specified by:
isProcessorBusy in interface IPerceptualBuffer

isPreparationBusy

public boolean isPreparationBusy()
Specified by:
isPreparationBusy in interface IPerceptualBuffer

isExecutionBusy

public boolean isExecutionBusy()
Specified by:
isExecutionBusy in interface IPerceptualBuffer

setModalityChunk

public void setModalityChunk(IChunk chunk)
Specified by:
setModalityChunk in interface IPerceptualBuffer

setExecutionChunk

public void setExecutionChunk(IChunk chunk)
Specified by:
setExecutionChunk in interface IPerceptualBuffer

setPreparationChunk

public void setPreparationChunk(IChunk chunk)
Specified by:
setPreparationChunk in interface IPerceptualBuffer

setProcessorChunk

public void setProcessorChunk(IChunk chunk)
Specified by:
setProcessorChunk in interface IPerceptualBuffer

getCompilableContext

public ICompilableContext getCompilableContext()
Specified by:
getCompilableContext in interface ICompilableBuffer