public class SimulatorSequencer extends AbstractSequencer implements Initializable
Sequencing instanance for
simulating the target load on STELLA. Consider the following points.
MasterMind.KEY_SIMULATE key to true.SimulatorSequencer as the sequencer in the master mind,
key MasterMind.KEY_SEQUENCER.MasterMind.KEY_LOCALWEATHER key should point to a
SimulatorWeather instance.SettableTime type.SimulatorWeatherPropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
private static double |
DEFADVANCE
The default speeding parameter.
|
private static String |
DEFFALSE
The default get-false triggers.
|
private static long |
DEFOVERHEAD
The default overhead in ms.
|
private static String |
DEFTIME
The default time parameter.
|
private static String |
DEFTRUE
The default get-true triggers.
|
private Map |
falsemap
A map linking target names to get-false trigger name on
run(). |
static String |
KEY_ADVANCE
Multiply the expected observing time with this prior to time-advance.
|
static String |
KEY_FALSE
The key linking target name to false-triggers.
|
static String |
KEY_OVERHEAD
The key linked to the overhead-time, i.e.
|
static String |
KEY_TIME
The key giving the name of the time parameter.
|
static String |
KEY_TRUE
The key linking target names to true-triggers.
|
private Thread |
mythread
The thread this sequencer runs in for a glimpse.
|
private TargetDefinition |
running
The target that should run.
|
private GlobalGrouping |
set
The parameter cluster hosting the time.
|
private Map |
truemap
A map linking target names to get-true trigger names on
run(). |
ALTERNATEHOST, ALTERNATEPORT, KEY_BINDNAME, KEY_EXPORTPORT, KEY_REGISTRYHOST, KEY_REGISTRYPORTKEY_NOINITONCREATE, POSTFIX_ALPHABET, POSTFIX_BYTES, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_MODTIME, POSTFIX_URLKEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORCONFIG, KEY_CLASSKEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME| Constructor and Description |
|---|
SimulatorSequencer(Map prop)
Construct a new sequencer for load simulation.
|
| Modifier and Type | Method and Description |
|---|---|
void |
abort(List dom)
Ignore.
|
void |
append(List dom)
Ignore.
|
void |
cancel()
Does nothing.
|
void |
forward(ReplyEvent rp)
Ignore.
|
Thread |
getAsociatedThread()
Returns the thread the sequencer is running in.
|
List |
getStepsForTarget(TargetDefinition target)
We don't need any steps for any sequence, but returning an empty list
here would refrain the sequencer from being executed.
|
void |
init()
Creates two maps that link target names to trigger names.
|
boolean |
isCancel()
Return false;
|
void |
load(List dom)
Ignore.
|
long |
maxTimeToCancel()
Maximum timer-out used on shut-down.
|
void |
prepend(List dom)
Ignore.
|
void |
registerGlobals(GlobalGrouping globals)
Needed for the time parameter.
|
void |
registerLauncher(CommandLaunching[] launch)
Not needed.
|
void |
registerRender(CommandRendering chef)
Not needed.
|
void |
run()
Advances the time for the calculated observing time
of the target or wait for this period.
|
Thread |
start()
In principle, we simply advance the time for the calculated observing
time.
|
createSequenceraddErrorListener, addRmiErrorListener, exit, isValid, notifyErrorListener, removeErrorListener, removeRmiErrorListener, sendError, sendError, sendError, sendStatus, sendStatus, sendStatusbindToRegistry, bindToRegistry, bindToRegistry, bindToRegistry, bindToRegistry, bindToRegistry, casterExit, casterExit, getBindName, getBindName, unbindFromRegistry, unbindFromRegistrycontainsRemoteProperty, getRemoteProperties, getRemoteProperty, setRemotePropertyclone, createFrom, createFrom, createFrom, createInstance, getApplet, getAsResources, getLocate, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, hasLocalURLs, initProperties, keyCreate, keyCreate, reload, setAppletaugment, augment, augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, parseObject, reload, removeProperty, requires, rescanned, setObject, setProperties, setProperty, stringProperties, toStringequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdefaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringPropertiespublic static final String KEY_TIME
public static final String KEY_ADVANCE
public static final String KEY_TRUE
public static final String KEY_FALSE
public static final String KEY_OVERHEAD
private static final String DEFTIME
private static final double DEFADVANCE
private static final String DEFTRUE
private static final String DEFFALSE
private static final long DEFOVERHEAD
private TargetDefinition running
private GlobalGrouping set
private Thread mythread
public SimulatorSequencer(Map prop)
public void init()
KEY_TRUE consists of target names
that spark setting of the indicated triggers to true, as soon as the
target run()s. The second map sets triggers to false.init in interface Initializableinit in class CastingContainerpublic List getStepsForTarget(TargetDefinition target)
getStepsForTarget in interface Sequencingpublic void load(List dom)
load in interface Sequencingpublic void abort(List dom)
abort in interface Sequencingpublic void append(List dom)
append in interface Sequencingpublic void prepend(List dom)
prepend in interface Sequencingpublic void registerGlobals(GlobalGrouping globals)
registerGlobals in interface GlobalDependingpublic void registerRender(CommandRendering chef)
registerRender in interface Sequencingpublic void registerLauncher(CommandLaunching[] launch)
registerLauncher in interface Sequencingpublic Thread start()
start in interface Sequencingpublic void run()
public Thread getAsociatedThread()
getAsociatedThread in interface CancelRunnablepublic long maxTimeToCancel()
maxTimeToCancel in interface CancelRunnablepublic void cancel()
cancel in interface CancelRunnablepublic void forward(ReplyEvent rp)
forward in interface ReplySubscriberpublic boolean isCancel()
isCancel in interface Sequencing