ants.messor
Class SimulatedTaskStorage
java.lang.Object
|
+--ants.messor.SimulatedTaskStorage
- All Implemented Interfaces:
- Clearable, EventListener, ResourceManager, Storage, TaskStorage
- public class SimulatedTaskStorage
- extends Object
- implements TaskStorage, EventListener
- Version:
- $Revision: 1.5 $
- Author:
- Alberto Montresor
Method Summary |
int |
addTasks(List list)
Add the task to the task set. |
void |
clear()
Restores the object to its initial state. |
void |
event(Object obj)
This method will be used to notify the storage that a certain
event has occurred. |
int |
getLoad()
Returns the current load of this task storage. |
List |
getTasks(int size)
Get tasks from the task set |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimulatedTaskStorage
public SimulatedTaskStorage(Factory factory,
String name)
- Parameters:
factory
- the factory to be used to read configuration arguments
and to create other configurable objectsname
- the name that is associated to this instance in the
configuration file
clear
public void clear()
- Description copied from interface:
Clearable
- Restores the object to its initial state.
- Specified by:
clear
in interface Clearable
addTasks
public int addTasks(List list)
- Add the task to the task set.
- Specified by:
addTasks
in interface TaskStorage
getTasks
public List getTasks(int size)
- Get tasks from the task set
- Specified by:
getTasks
in interface TaskStorage
getLoad
public int getLoad()
- Returns the current load of this task storage.
- Specified by:
getLoad
in interface TaskStorage
event
public void event(Object obj)
- This method will be used to notify the storage that a certain
event has occurred.