|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FrameworkTask
This is the base interface for all task process in the LIDA framework.
All parts of processes in the LIDA Framework have to implement this interface.
A FrameworkTask is intended as a small fraction of a process. For example a Codelet
or a Feature
detector are examples of FrameworkTask. However, if the process includes a loop, one run of
the FrameworkTask represents only one iteration of the loop.
A TaskSpawner
can send FrameworkTasks to the TaskManager
for execution. A TaskSpawner
receives
the task each time it finishes running, so the TaskSpawner can decide if this particular task
must run again or not. This is based on the status of the FrameworkTask.
The FrameworkTask should set its status during it execution. Implementations of this interface should
call the task's TaskSpawner method, TaskSpawner.receiveFinishedTask(FrameworkTask)
, to handle the finished task at the end of the 'call' method.
Most tasks can extend from this instead of implementing this interface from scratch.
Field Summary |
---|
Fields inherited from interface edu.memphis.ccrg.lida.framework.shared.activation.Learnable |
---|
DEFAULT_BASE_LEVEL_ACTIVATION, DEFAULT_LEARNABLE_REMOVAL_THRESHOLD |
Fields inherited from interface edu.memphis.ccrg.lida.framework.shared.activation.Activatible |
---|
DEFAULT_ACTIVATIBLE_REMOVAL_THRESHOLD, DEFAULT_ACTIVATION |
Method Summary | |
---|---|
void |
cancel()
Sets this FrameworkTask's TaskStatus to TaskStatus.CANCELED .FrameworkTask cannot be restarted and its TaskStatus can no longer change. |
TaskSpawner |
getControllingTaskSpawner()
Gets TaskSpawner that controls this FrameworkTask. |
long |
getNextTicksPerRun()
Gets nextTicksPerRun |
long |
getScheduledTick()
Returns the tick when this task is scheduled to run next. |
long |
getTaskId()
A unique id that is set at the time of creation. |
TaskStatus |
getTaskStatus()
Returns status |
int |
getTicksPerRun()
Gets ticksPerRun |
void |
setControllingTaskSpawner(TaskSpawner ts)
Sets TaskSpawner that controls this FrameworkTask. |
void |
setNextTicksPerRun(long t)
Sets nextTicksPerRun |
void |
setScheduledTick(long t)
Sets tick when this task will be run next. |
void |
setTaskStatus(TaskStatus s)
Sets the task's TaskStatus . |
void |
setTicksPerRun(int t)
Sets ticksPerRun |
void |
stopRunning()
Deprecated. To be replaced by cancel() which should be used instead.
The method's name makes it ambiguous as to whether it sets TaskStatus to TaskStatus.FINISHED or TaskStatus.CANCELED . |
Methods inherited from interface java.util.concurrent.Callable |
---|
call |
Methods inherited from interface edu.memphis.ccrg.lida.framework.shared.activation.Learnable |
---|
decayBaseLevelActivation, getBaseLevelActivation, getBaseLevelDecayStrategy, getBaseLevelExciteStrategy, getLearnableRemovalThreshold, getTotalActivationStrategy, reinforceBaseLevelActivation, setBaseLevelActivation, setBaseLevelDecayStrategy, setBaseLevelExciteStrategy, setBaseLevelRemovalThreshold, setTotalActivationStrategy |
Methods inherited from interface edu.memphis.ccrg.lida.framework.shared.activation.Activatible |
---|
decay, excite, getActivatibleRemovalThreshold, getActivation, getDecayStrategy, getExciteStrategy, getTotalActivation, isRemovable, setActivatibleRemovalThreshold, setActivation, setDecayStrategy, setExciteStrategy |
Methods inherited from interface edu.memphis.ccrg.lida.framework.initialization.Initializable |
---|
containsParameter, getParam, getParameters, init, init |
Methods inherited from interface edu.memphis.ccrg.lida.framework.initialization.FullyInitializable |
---|
setAssociatedModule |
Method Detail |
---|
TaskStatus getTaskStatus()
void setTaskStatus(TaskStatus s)
TaskStatus
. If TaskStatus
is TaskStatus.CANCELED
TaskStatus
will not be modified.
s
- the new TaskStatus
@Deprecated void stopRunning()
cancel()
which should be used instead.
The method's name makes it ambiguous as to whether it sets TaskStatus
to TaskStatus.FINISHED
or TaskStatus.CANCELED
.
void cancel()
TaskStatus
to TaskStatus.CANCELED
.TaskStatus
can no longer change.
long getTaskId()
void setTicksPerRun(int t)
t
- number of ticks that will occur between executions of this taskchange ticksPerRun for the next run only
int getTicksPerRun()
void setControllingTaskSpawner(TaskSpawner ts)
ts
- the TaskSpawnerTaskSpawner getControllingTaskSpawner()
void setNextTicksPerRun(long t)
t
- number of ticks that must pass before for the next, and only the next, execution of this
FrameworkTask.to set the permanent (default) number
of ticksPerRun
long getNextTicksPerRun()
FrameworkTask
.void setScheduledTick(long t)
t
- tick to schedule this taskTaskManager
long getScheduledTick()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |