|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface TaskService
This Service provides facilities for scheduling tasks to
run after the current task completes. The methods inherited from
TaskManager schedule durable, transactional tasks. The
scheduleNonDurableTask methods defined here are used to
schedule tasks that are not persisted by the TaskService but
optionally invoked in a transactional context.
By default all tasks scheduled will be owned by the calling task's
owning identity. To create a new owning identity for a task use the
RunWithNewIdentity annotation as described in the docs
for TaskManager.
TaskManager| Method Summary | |
|---|---|
void |
scheduleNonDurableTask(KernelRunnable task,
boolean transactional)
Schedules a single task to run once the current task has finished. |
void |
scheduleNonDurableTask(KernelRunnable task,
long delay,
boolean transactional)
Schedules a single task to run, after the given delay, once the current task has finished. |
| Methods inherited from interface com.sun.sgs.app.TaskManager |
|---|
schedulePeriodicTask, scheduleTask, scheduleTask, shouldContinue |
| Methods inherited from interface com.sun.sgs.service.Service |
|---|
getName, ready, shutdown |
| Method Detail |
|---|
void scheduleNonDurableTask(KernelRunnable task,
boolean transactional)
TaskService, and
therefore is not guaranteed to run.
task - the KernelTask to runtransactional - true if the given task should be run
in a transaction, false otherwise
TaskRejectedException - if the backing scheduler refuses to
accept the task
TransactionException - if the operation failed because of a
problem with the current transaction
void scheduleNonDurableTask(KernelRunnable task,
long delay,
boolean transactional)
TaskService, and therefore is not guaranteed to run.
As described in TaskManager, the delay is from the
time of this call, not from the time that the transaction commits.
task - the KernelTask to rundelay - the number of milliseconds to delay before running the tasktransactional - true if the given task should be run
in a transaction, false otherwise
TaskRejectedException - if the backing scheduler refuses to
accept the task
TransactionException - if the operation failed because of a
problem with the current transaction
|
RedDwarf, Version 0.10.1 2010-03-14 10:56:12 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||