C# Class Summer.Batch.Common.TaskExecution.SimpleAsyncTaskExecutor

Inheritance: IAsyncTaskExecutor
Datei anzeigen Open project: SummerBatch/SummerBatch Class Usage Examples

Public Methods

Method Description
Execute ( System.Threading.Tasks.Task task ) : void

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.

Execute ( System.Threading.Tasks.Task task, long startTimeout ) : void

Executes the given task.

IsThrottleActive ( ) : bool

Return whether owned throttle is currently active.

Submit ( System.Threading.Tasks.Task task ) : void

Submits a task for execution.

Protected Methods

Method Description
DoExecute ( System.Threading.Tasks.Task task ) : void

Template method for the actual execution of a task. The default implementation starts the task.

Private Methods

Method Description
GetConcurrencyThrottlingTask ( System.Threading.Tasks.Task target ) : System.Threading.Tasks.Task

Method Details

DoExecute() protected method

Template method for the actual execution of a task. The default implementation starts the task.
protected DoExecute ( System.Threading.Tasks.Task task ) : void
task System.Threading.Tasks.Task The task to execute.
return void

Execute() public method

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.
 If the given task was not accepted.
public Execute ( System.Threading.Tasks.Task task ) : void
task System.Threading.Tasks.Task the Task to execute (never null).
return void

Execute() public method

Executes the given task.
   in case of the task being rejected because /// of the timeout (i.e. it cannot be started in time)
public Execute ( System.Threading.Tasks.Task task, long startTimeout ) : void
task System.Threading.Tasks.Task The task to execute.
startTimeout long 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.
return void

IsThrottleActive() public method

Return whether owned throttle is currently active.
public IsThrottleActive ( ) : bool
return bool

Submit() public method

Submits a task for execution.
 If the given task was not accepted.
public Submit ( System.Threading.Tasks.Task task ) : void
task System.Threading.Tasks.Task The task to execute.
return void