public class ModelsLock extends ModelListenerAdaptor implements IInstrument
Constructor and Description |
---|
ModelsLock() |
Modifier and Type | Method and Description |
---|---|
boolean |
allAreBlocked() |
boolean |
allAreFree() |
protected void |
checkAndBlock(IModel model)
do the blocking.
|
java.util.concurrent.Future<java.lang.Boolean> |
close()
close the lock on all the installed models.
|
void |
cycleStarted(ModelEvent me)
called at the start of each cycle.
|
void |
initialize()
perform any dependent initialization.
|
void |
install(IModel model)
Description of the Method
|
boolean |
isClosed()
returns true if the gate is closed, but not necessarily if everyone is.
|
void |
modelStarted(ModelEvent me)
called once the model has started its execution.
|
void |
modelStopped(ModelEvent me)
called when the model's execution has completed.
|
java.util.concurrent.Future<java.lang.Boolean> |
open()
release the models.
|
void |
uninstall(IModel model)
Description of the Method
|
bufferInstalled, cycleStopped, exceptionThrown, extensionInstalled, instrumentInstalled, logEvent, modelConnected, modelDisconnected, modelInitialized, modelResumed, modelSuspended, moduleInstalled, parameterChanged
public void initialize()
IInstrument
initialize
in interface IInitializable
initialize
in interface IInstrument
public void modelStarted(ModelEvent me)
IModelListener
modelStarted
in interface IModelListener
modelStarted
in class ModelListenerAdaptor
public void modelStopped(ModelEvent me)
IModelListener
modelStopped
in interface IModelListener
modelStopped
in class ModelListenerAdaptor
public void cycleStarted(ModelEvent me)
IModelListener
cycleStarted
in interface IModelListener
cycleStarted
in class ModelListenerAdaptor
public void install(IModel model)
IInstrument
install
in interface IInstallable
install
in interface IInstrument
model
- Description of the Parameterpublic void uninstall(IModel model)
IInstrument
uninstall
in interface IInstallable
uninstall
in interface IInstrument
model
- Description of the Parameterpublic boolean isClosed()
public boolean allAreFree()
public boolean allAreBlocked()
public java.util.concurrent.Future<java.lang.Boolean> close()
Future.get()
. The return boolean will be true, unless
there are no models. i.e., If no models are running, it will return false.public java.util.concurrent.Future<java.lang.Boolean> open()
protected void checkAndBlock(IModel model)
model
-