public final class ExecOptions
extends java.lang.Object
ExecOptions could define the allowed 'working time' for Tasks, maximum number of devices concurrently
executing a Rule, etc. All of the defined options are valid for Rules, but only two of them (concurrency(int) and
timeConstraint(TimeConstraint)) are applicable for Tasks. When a Task is automatically launched by a Rule trigger, those
two execution options are also automatically taken by the triggering Rule.
are applicable for Tasks.
Usage Example:
new ExecOptions().oncePerDevice(true).timeConstraint(
new DaylySchedule().addTimeSpan(new Date("00:00"), new Date("06:00"))
)| Modifier and Type | Class and Description |
|---|---|
static class |
ExecOptions.Overlapping
Defines whether multiple Tasks (launched out of the same Rule)
over a particular device can be overlapped or should be replaced.
|
| Modifier and Type | Method and Description |
|---|---|
ExecOptions |
autoDisable(boolean autoDisable)
Defines whether the Rule should be automatically disabled once all targets from the Scope pass through the triggering conditions.
|
ExecOptions |
concurrency(int limit)
Defines concurrency limit execution option.
|
static ExecOptions |
create()
Creates ExecOptions instance ready to be filled with desired options.
|
int |
getConcurrencyLimit()
Returns the maximum number of concurrent device executions per backend host.
|
ExecOptions.Overlapping |
getOverlapping()
Returns the overlapping option.
|
TimeConstraint |
getTimeConstraint()
Returns the time constraint option.
|
boolean |
isAutoDisable()
Returns the
autoDisable option for this ExecOptions object. |
boolean |
isOncePerDevice()
Returns the
oncePerDevice option for this ExecOptions object. |
ExecOptions |
oncePerDevice(boolean oncePerDevice)
Defines whether the Rule can be executed multiple times on a given device, or should be executed only once,
skipping subsequent triggers for that device.
|
ExecOptions |
overlap(ExecOptions.Overlapping option)
Sets
ExecOptions.Overlapping execution option. |
ExecOptions |
timeConstraint(TimeConstraint timeConstraint)
Defines at what time-schedule it is permitted for the Task to act.
|
java.lang.String |
toString() |
public static ExecOptions create()
public ExecOptions overlap(ExecOptions.Overlapping option)
ExecOptions.Overlapping execution option.option - overlapping option. This option is applicable only for Rules.ExecOptions object having the provided option added.public ExecOptions concurrency(int limit)
limit * N, where N
is the Number of mPRM Backend Hosts with MS roles, each of which maintaining a maximum of limit
active device execution among the set of devices handled by that that Backend Host.limit - concurrency limit number.ExecOptions object having the provided option added.public ExecOptions oncePerDevice(boolean oncePerDevice)
oncePerDevice - flag indicating whether the Rule should be triggered no more than once for the same device.ExecOptions object having the provided option added.public ExecOptions autoDisable(boolean autoDisable)
oncePerDevice(boolean) set to true.
The option is not applicable for Tasks.autoDisable - flag indicating whether autoDisable option is switched on.ExecOptions object having the provided option added.public ExecOptions timeConstraint(TimeConstraint timeConstraint)
timeConstraint - time schedule constraint definition.ExecOptions object having the provided option added.public int getConcurrencyLimit()
getConcurrencyLimit() * N, where N
is the Number of mPRM Backend Hosts with MS roles, each of which maintaining a maximum of getConcurrencyLimit()
active device execution among the set of devices handled by that that Backend Host.public ExecOptions.Overlapping getOverlapping()
public TimeConstraint getTimeConstraint()
ExecOptions object or null if such is not supplied.public boolean isOncePerDevice()
oncePerDevice option for this ExecOptions object.true if the Rule should be triggered no more than once for the same device,
false otherwise.public boolean isAutoDisable()
autoDisable option for this ExecOptions object.true if the Rule should be automatically disabled once all targets from the Scope pass
through the triggering conditions, false otherwise.public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2019 Bosch Software Innovations GmbH. All Rights Reserved.