Set a maximum execution time for a proxied task.
Task package: | org.schmant.task.base |
Java package: | org.schmant.task.proxy |
Category: | Meta tasks |
Since: | 0.5 |
EntityFS-aware? | Yes* |
Implements: | ActionTaskFactory GeneratorTaskFactory ProcessTaskFactory |
Produces: | The generated object of the proxied task, if that task generates one. |
Description:
Set a maximum execution time for a proxied task. If the task executes longer than its allocated time, it is interrupted and the task throws an exception.
This task factory implements ProcessTaskFactory so that it can be used by a RecursiveActionTF or a RecursiveProcessTF.
Required properties
Properties
taskFactory (required) | top |
Task factory for creating proxied tasks.
- Setter method:
setTaskFactory(TaskFactory<?, ?> f)
parameters:f
– A task factory.
time (required) | top |
The maximum running time for the proxied task. If the task is not completed within the allocated time, it is interrupted.
- Setter method:
setTime(long t, TimeUnit u)
parameters:t
– A time value.u
– The unit for the time value.
Examples
See this ExtProcessTF example.
* An EntityFS-aware task is implemented using EntityFS. This means that it uses the filter settings of DirectoryView:s and also that it often can work with other file system implementations than File-based, such as the RAM file system.