Based on an implementation's policy, a task and its owner, that task may not be accepted for execution. In this case {@code TaskRejectedException}is thrown. To ensure that a task will be accepted methods are provided to get a {@code TaskReservation}. This is especially useful for {@code Service}methods working within a transaction that need to ensure that a task will be accepted before they can commit.
Note that, because the tasks submitted through this interface may run any length of time, there are no guarantees about when a given task will start. If a task is scheduled to run immediately, or at some point in the future, then this means that the scheduler will try to acquire resources to run the task at that point. It may still be some indefinite length of time before the task can actually be run.
|
|
|
|
|
|