com.intel.cosbench.driver.repository
Class RAMMissionRepository

java.lang.Object
  extended by com.intel.cosbench.driver.repository.RAMMissionRepository
All Implemented Interfaces:
MissionListener, MissionRepository

public class RAMMissionRepository
extends java.lang.Object
implements MissionRepository, MissionListener

This class represents one in-memory repository to store all missions information.

Author:
ywang19

Constructor Summary
RAMMissionRepository()
           
 
Method Summary
 MissionContext[] getActiveMissions()
           
 MissionContext[] getAllMissions()
           
 MissionContext[] getInactiveMissions()
           
 MissionContext getMission(java.lang.String id)
           
 int getSize()
           
 void missionStopped(MissionContext mission)
           
 void saveMission(MissionContext mission)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RAMMissionRepository

public RAMMissionRepository()
Method Detail

getSize

public int getSize()
Specified by:
getSize in interface MissionRepository

saveMission

public void saveMission(MissionContext mission)
Specified by:
saveMission in interface MissionRepository

getMission

public MissionContext getMission(java.lang.String id)
Specified by:
getMission in interface MissionRepository

getAllMissions

public MissionContext[] getAllMissions()
Specified by:
getAllMissions in interface MissionRepository

getActiveMissions

public MissionContext[] getActiveMissions()
Specified by:
getActiveMissions in interface MissionRepository

getInactiveMissions

public MissionContext[] getInactiveMissions()
Specified by:
getInactiveMissions in interface MissionRepository

missionStopped

public void missionStopped(MissionContext mission)
Specified by:
missionStopped in interface MissionListener