|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.memphis.ccrg.lida.framework.initialization.InitializableImpl edu.memphis.ccrg.lida.framework.shared.activation.ActivatibleImpl edu.memphis.ccrg.lida.framework.shared.activation.LearnableImpl edu.memphis.ccrg.lida.framework.tasks.FrameworkTaskImpl
public abstract class FrameworkTaskImpl
This class implements the FrameworkTask Interface. This class should be used as the base class for all FrameworkTasks.
Field Summary | |
---|---|
protected TaskStatus |
status
TaskStatus of this task. |
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 |
Constructor Summary | |
---|---|
FrameworkTaskImpl()
Constructs a FrameworkTaskImpl with default ticksPerRun |
|
FrameworkTaskImpl(int ticksPerRun)
Constructs a FrameworkTaskImpl with specified ticksPerRun |
|
FrameworkTaskImpl(int ticksPerRun,
TaskSpawner ts)
Constructs a FrameworkTaskImpl with default ticksPerRun and specified
controlling TaskSpawner |
Method Summary | |
---|---|
FrameworkTask |
call()
This method should not be called directly nor should it be overridden. |
void |
cancel()
Sets this FrameworkTask's TaskStatus to TaskStatus.CANCELED .FrameworkTask cannot be restarted and its TaskStatus can no longer change. |
boolean |
equals(java.lang.Object o)
|
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 |
int |
hashCode()
|
protected abstract void |
runThisFrameworkTask()
To be overridden by extending classes. |
void |
setAssociatedModule(FrameworkModule module,
java.lang.String moduleUsage)
Subclasses may override this method. |
void |
setControllingTaskSpawner(TaskSpawner ts)
Sets TaskSpawner that controls this FrameworkTask. |
void |
setNextTicksPerRun(long tick)
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 ticks)
Sets ticksPerRun |
void |
stopRunning()
Deprecated. |
java.lang.String |
toString()
|
Methods inherited from class edu.memphis.ccrg.lida.framework.shared.activation.LearnableImpl |
---|
decay, decayBaseLevelActivation, getBaseLevelActivation, getBaseLevelDecayStrategy, getBaseLevelExciteStrategy, getLearnableRemovalThreshold, getTotalActivation, getTotalActivationStrategy, init, isRemovable, reinforceBaseLevelActivation, setBaseLevelActivation, setBaseLevelDecayStrategy, setBaseLevelExciteStrategy, setBaseLevelRemovalThreshold, setTotalActivationStrategy |
Methods inherited from class edu.memphis.ccrg.lida.framework.shared.activation.ActivatibleImpl |
---|
excite, getActivatibleRemovalThreshold, getActivation, getDecayStrategy, getExciteStrategy, setActivatibleRemovalThreshold, setActivation, setDecayStrategy, setExciteStrategy |
Methods inherited from class edu.memphis.ccrg.lida.framework.initialization.InitializableImpl |
---|
containsParameter, getParam, getParameters, init |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
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 |
Field Detail |
---|
protected TaskStatus status
TaskStatus
of this task. Initial value is TaskStatus.RUNNING
.
Constructor Detail |
---|
public FrameworkTaskImpl()
FrameworkTaskImpl
with default ticksPerRun
public FrameworkTaskImpl(int ticksPerRun)
FrameworkTaskImpl
with specified ticksPerRun
ticksPerRun
- task's run frequencypublic FrameworkTaskImpl(int ticksPerRun, TaskSpawner ts)
FrameworkTaskImpl
with default ticksPerRun and specified
controlling TaskSpawner
ticksPerRun
- task's run frequencyts
- controlling TaskSpawner
Method Detail |
---|
public long getScheduledTick()
FrameworkTask
getScheduledTick
in interface FrameworkTask
public void setScheduledTick(long t)
FrameworkTask
setScheduledTick
in interface FrameworkTask
t
- tick to schedule this taskTaskManager
public FrameworkTask call()
runThisFrameworkTask()
instead.
call
in interface java.util.concurrent.Callable<FrameworkTask>
Callable.call()
protected abstract void runThisFrameworkTask()
TaskStatus
of a task.
For example, if the task should only run once and stop, then the method cancel()
may be used to stop the task from further execution (calls of this runThisFrameworkTask()
beyond the current one.
public void setTaskStatus(TaskStatus s)
FrameworkTask
TaskStatus
. If TaskStatus
is TaskStatus.CANCELED
TaskStatus
will not be modified.
setTaskStatus
in interface FrameworkTask
s
- the new TaskStatus
public TaskStatus getTaskStatus()
FrameworkTask
getTaskStatus
in interface FrameworkTask
public long getTaskId()
FrameworkTask
getTaskId
in interface FrameworkTask
public int getTicksPerRun()
FrameworkTask
getTicksPerRun
in interface FrameworkTask
public void setTicksPerRun(int ticks)
FrameworkTask
setTicksPerRun
in interface FrameworkTask
ticks
- number of ticks that will occur between executions of this taskchange ticksPerRun for the next run only
@Deprecated public void stopRunning()
FrameworkTask
stopRunning
in interface FrameworkTask
public void cancel()
FrameworkTask
TaskStatus
to TaskStatus.CANCELED
.TaskStatus
can no longer change.
cancel
in interface FrameworkTask
public TaskSpawner getControllingTaskSpawner()
FrameworkTask
getControllingTaskSpawner
in interface FrameworkTask
public void setControllingTaskSpawner(TaskSpawner ts)
FrameworkTask
setControllingTaskSpawner
in interface FrameworkTask
ts
- the TaskSpawnerpublic long getNextTicksPerRun()
FrameworkTask
getNextTicksPerRun
in interface FrameworkTask
FrameworkTask
.public void setNextTicksPerRun(long tick)
FrameworkTask
setNextTicksPerRun
in interface FrameworkTask
tick
- 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
public void setAssociatedModule(FrameworkModule module, java.lang.String moduleUsage)
setAssociatedModule
in interface FullyInitializable
module
- the module to be associated.moduleUsage
- how module will be usedModuleUsage
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |