public class SimulationRuntimePolicy extends Object implements RuntimePolicy
Modifier and Type | Field and Description |
---|---|
static Timestamp |
UNLIMITED_STOP_TIME |
OPERATION, SIMULATION
Constructor and Description |
---|
SimulationRuntimePolicy()
SimulationRuntimePolicy with standard settings. |
SimulationRuntimePolicy(int parallelism) |
SimulationRuntimePolicy(Timestamp stopTime) |
SimulationRuntimePolicy(Timestamp stopTime,
int parallelism) |
Modifier and Type | Method and Description |
---|---|
int |
getParallelism()
Returns the intended CPU parallelism for process execution within a controller.
|
Timestamp |
getTerminationTime()
Returns the (logical) timestamp that shall cause the platform to terminate before time
passes on to a later timestamp.
|
boolean |
stopBeforeTime(Timestamp time)
Indicates whether this policy requires controller termination before the given (logical)
timestamp has passed.
|
boolean |
stopOnException()
Indicates whether this policy requires controller termination when a process fails due to
any uncaught
Throwable or Exception . |
boolean |
stopWhenEmpty()
Indicates whether this policy requires termination when there are no further processes
to be executed.
|
boolean |
stopWhenIdle()
Indicates whether this policy requires termination when there are no further process
activations to be scheduled (although there are inactive processes left).
|
public static final Timestamp UNLIMITED_STOP_TIME
public SimulationRuntimePolicy()
SimulationRuntimePolicy
with standard settings. There will be no stop time
and parallelism setting for agent execution will correspond to available CPUs - 1.public SimulationRuntimePolicy(Timestamp stopTime)
public SimulationRuntimePolicy(int parallelism)
public SimulationRuntimePolicy(Timestamp stopTime, int parallelism)
public boolean stopWhenEmpty()
RuntimePolicy
stopWhenEmpty
in interface RuntimePolicy
true
when controller shall stop when empty, false
otherwise.public boolean stopWhenIdle()
RuntimePolicy
stopWhenIdle
in interface RuntimePolicy
true
when controller shall stop when idle, false
otherwise.public final Timestamp getTerminationTime()
RuntimePolicy
getTerminationTime
in interface RuntimePolicy
Timestamp.MAX
.public final boolean stopBeforeTime(Timestamp time)
RuntimePolicy
Timestamp.MAX
every implementation is supposed
to return true
.stopBeforeTime
in interface RuntimePolicy
true
when controller shall stop before the given timestamp passed,
false
otherwise.RuntimePolicy.getTerminationTime()
public boolean stopOnException()
RuntimePolicy
Throwable
or Exception
.stopOnException
in interface RuntimePolicy
true if the platform should stop execution when any process fails,
false
otherwise.
public int getParallelism()
RuntimePolicy
scheduling
.getParallelism
in interface RuntimePolicy
Copyright © Aimpulse Intelligent Systems GmbH
All rights reserved.