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

Field Summary
 
Fields inherited from interface ants.messor.TaskStorage
NAME
 
Fields inherited from interface anthill.storage.Storage
DOC_STORAGE, PHR_STORAGE, URL_STORAGE
 
Constructor Summary
SimulatedTaskStorage(Factory factory, String name)
           
 
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
 

Constructor Detail

SimulatedTaskStorage

public SimulatedTaskStorage(Factory factory,
                            String name)
Parameters:
factory - the factory to be used to read configuration arguments and to create other configurable objects
name - the name that is associated to this instance in the configuration file
Method Detail

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.