ITaskExecutor asynchronous implementation. Supports limiting concurrent threads through the "concurrencyLimit" bean property. By default, the number of concurrent threads is unlimited. NOTE: This implementation does not reuse threads! Consider a thread-pooling TaskExecutor implementation instead, in particular for executing a large number of short-lived tasks. More...
Public Member Functions | |
bool | IsThrottleActive () |
Return whether owned throttle is currently active. More... | |
void | Execute (Task task, long startTimeout) |
Executes the given task. More... | |
void | Submit (Task task) |
Submits a task for execution. More... | |
void | Execute (Task task) |
Executes the given task. The call might return immediately if the implementation uses an asynchronous execution strategy, or might block in the case of synchronous execution. More... | |
Protected Member Functions | |
void | DoExecute (Task task) |
Template method for the actual execution of a task. The default implementation starts the task. More... | |
Detailed Description
ITaskExecutor asynchronous implementation. Supports limiting concurrent threads through the "concurrencyLimit" bean property. By default, the number of concurrent threads is unlimited. NOTE: This implementation does not reuse threads! Consider a thread-pooling TaskExecutor implementation instead, in particular for executing a large number of short-lived tasks.
Member Function Documentation
|
protected |
Template method for the actual execution of a task. The default implementation starts the task.
- Parameters
-
task The task to execute.
void Summer.Batch.Common.TaskExecution.SimpleAsyncTaskExecutor.Execute | ( | Task | task, |
long | startTimeout | ||
) |
Executes the given task.
- Parameters
-
task The task to execute. startTimeout The time duration ( inmilliseconds) within which the task is supposed to start. This is intended as a hint to the executor, allowing for preferred handling of immediate tasks.
- Exceptions
-
TaskRejectedException TaskTimeoutException in case of the task being rejected because of the timeout (i.e. it cannot be started in time)
Implements Summer.Batch.Common.TaskExecution.IAsyncTaskExecutor.
void Summer.Batch.Common.TaskExecution.SimpleAsyncTaskExecutor.Execute | ( | Task | task | ) |
Executes the given task. The call might return immediately if the implementation uses an asynchronous execution strategy, or might block in the case of synchronous execution.
- Parameters
-
task the Task to execute (never null).
- Exceptions
-
TaskRejectedException If the given task was not accepted.
Implements Summer.Batch.Common.TaskExecution.ITaskExecutor.
bool Summer.Batch.Common.TaskExecution.SimpleAsyncTaskExecutor.IsThrottleActive | ( | ) |
Return whether owned throttle is currently active.
- Returns
void Summer.Batch.Common.TaskExecution.SimpleAsyncTaskExecutor.Submit | ( | Task | task | ) |
Submits a task for execution.
- Parameters
-
task The task to execute.
- Exceptions
-
TaskRejectedException If the given task was not accepted.
Implements Summer.Batch.Common.TaskExecution.IAsyncTaskExecutor.
The documentation for this class was generated from the following file:
- Summer.Batch.Common/TaskExecution/SimpleAsyncTaskExecutor.cs