IPriorityTask Interface |
Namespace: Tangosol.Net
public interface IPriorityTask
The IPriorityTask type exposes the following members.
Name | Description | |
---|---|---|
![]() | ExecutionTimeoutMillis |
The maximum amount of time this task is allowed to run before the
corresponding service will attempt to stop it.
|
![]() | RequestTimeoutMillis |
The maximum amount of time a calling thread is willing to wait
for a result of the request execution.
|
![]() | SchedulingPriority |
This task's scheduling priority.
|
Name | Description | |
---|---|---|
![]() | RunCanceled |
This method will be called if and only if all attempts to
interrupt this task were unsuccesful in stopping the execution or
if the execution was canceled before it had a chance to
run at all.
|
Instances of IPriorityTask typically also implement either IInvocable or IRunnable interface.
Depending on the value of SchedulingPriority property, the scheduling order will be one of the following:
A best effort will be made to limit the task execution time according to the value of the ExecutionTimeoutMillis property. However,it should be noted that:
In addition to allowing control of the task execution (as scheduled and measured on the server side), the IPriorityTask interface could also be used to control the request time from the calling thread perspective (measured on the client). A best effort will be made to limit the request time (the time period that the calling thread is blocked waiting for a response from the corresponding service) to the value of the RequestTimeoutMillis property.
It should be noted that the request timeout value (RT) could be grater than, equal to or less than the task execution timeout value (ET). The value of RT which is less than ET indicates that even though the task execution is allowed to take longer period of time, the client thread will not wait for a result of the execution and will be able to handle a timeout exception if it arises. Since the time spent by the task waiting in the service backlog queue does not count toward the task execution time, a value of RT that is equal or slightly greater than ET still leaves a possibility that the client thread will throw a TimeoutException before the task completes its execution normally on a server.