|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--fungus.core.scheduler.Pool
Un pool d'agent.
Les pools d'agents sont des ensembles d'agents qui seront geres par
un Scheduler.
Scheduler
,
SchedulerService
Field Summary | |
---|---|
protected AgentIDMap |
pool
Le pool d'agent à être gere. |
protected Time |
time
l'heure courante |
Constructor Summary | |
---|---|
Pool()
|
Method Summary | |
---|---|
void |
addAgent(AgentID agent)
Ajoute un agent au pool. |
void |
addAgent(AgentID agent,
Time t)
|
abstract void |
advanceInTime()
Avance le temps. |
Time |
getCurrentTime()
Donne l'heure courante |
Collection |
getSchedulableAgent(Time t)
Renvoie l'ensemble des agents qui peuvent etre traiter. |
Collection |
keySet()
Deprecated. Utiliser getSchedulableAgent(Time) . |
abstract Time |
nextTic()
Renvoie l'heure du prochain |
void |
put(AgentID id,
Time t)
Deprecated. On prefere utiliser addAgent(AgentID) . |
boolean |
removeAgent(AgentID agent)
Enleve un agent du pool |
void |
setWakeupTime(AgentID id,
Time time)
Fixe l'heure de redémarage d'un agent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected AgentIDMap pool
protected Time time
Constructor Detail |
public Pool()
Method Detail |
public void addAgent(AgentID agent)
agent
- an AgentID
valuepublic void addAgent(AgentID agent, Time t)
public boolean removeAgent(AgentID agent)
agent
- l'agent à enlevertrue
si l'agnet à bien était enlevépublic Collection getSchedulableAgent(Time t)
t
- l'heure limite de declenchement des agents.public void put(AgentID id, Time t)
addAgent(AgentID)
.
id
- an AgentID
valuet
- a Time
valuepublic void setWakeupTime(AgentID id, Time time)
id
- l'agent à traitertime
- l'heure de redémaragepublic Collection keySet()
getSchedulableAgent(Time)
.
Set
valuepublic Time getCurrentTime()
TimeModel
getCurrentTime
in interface TimeModel
fungus.core.scheduler.TimeModel
public abstract void advanceInTime()
TimeModel
advanceInTime
in interface TimeModel
public abstract Time nextTic()
TimeModel
nextTic
in interface TimeModel
fungus.core.scheduler.TimeModel
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |