|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.concurrent.AbstractExecutorService
java.util.concurrent.ThreadPoolExecutor
fr.ifremer.isisfish.simulator.launcher.SimulationExecutor
public class SimulationExecutor
Un executor qui utilise un certain type de SimulatorLauncher pour
executer les jobs soumis dans la queue de SimulationService
Les fonctionnalites en plus par rapport a un ThreadPoolExecutor sont:
SimulatorLauncher
du job
Il est aussi possible d'ecoute l'etat de l'attribut pause
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor |
|---|
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy |
| Field Summary | |
|---|---|
protected int |
lastCorePoolSize
le nombre de thread utilise avant la pause |
protected SimulatorLauncher |
launcher
le launcher a utilise pour les simulations |
protected boolean |
pause
vrai si cet executor est en pause |
protected PropertyChangeSupport |
propertyListeners
|
protected SimulationService |
simulationService
le simulation service qui a cree cet executor |
| Constructor Summary | |
|---|---|
SimulationExecutor(SimulationService simulationService,
SimulatorLauncher launcher,
SimulationQueue workQueue)
|
|
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
|
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener listener)
|
protected void |
beforeExecute(Thread t,
Runnable r)
Met les threads en attente si pause est vrai, et fixe le SimulatorLauncher a utiliser pour par la tache. |
SimulatorLauncher |
getLauncher()
|
SimulationService |
getSimulationService()
|
boolean |
isPause()
|
void |
pause()
demande au thread d'arreter de prendre de nouvelle tache |
void |
removePropertyChangeListener(PropertyChangeListener listener)
|
void |
removePropertyChangeListener(String propertyName,
PropertyChangeListener listener)
|
void |
resume()
indique au thread de recommencer a prendre de nouvelle tache |
void |
setPause(boolean pause)
Change la valeur de la variable pause, si pause est alors vrai notifie tous les threads en attente |
| Methods inherited from class java.util.concurrent.AbstractExecutorService |
|---|
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submit |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected PropertyChangeSupport propertyListeners
protected boolean pause
protected int lastCorePoolSize
protected SimulationService simulationService
protected SimulatorLauncher launcher
| Constructor Detail |
|---|
public SimulationExecutor(SimulationService simulationService, SimulatorLauncher launcher, SimulationQueue workQueue)
| Method Detail |
|---|
public SimulationService getSimulationService()
public SimulatorLauncher getLauncher()
public void addPropertyChangeListener(PropertyChangeListener listener)
public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
public void removePropertyChangeListener(PropertyChangeListener listener)
public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
protected void beforeExecute(Thread t, Runnable r)
SimulatorLauncher a utiliser pour par la tache.
Si la tache a deja un SimulatorLauncher d'assigne, on ne fait
pas la tache
beforeExecute in class ThreadPoolExecutort - le thread qui va executer la tacher - public boolean isPause()
public void pause()
public void resume()
public void setPause(boolean pause)
pause - pause value to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||