public interface WorkManager
| Modifier and Type | Field and Description |
|---|---|
static long |
IMMEDIATE
No start delay
|
static long |
INDEFINITE
Indefinite start delay
|
static long |
UNKNOWN
Unknown/unspecified start delay
|
| Modifier and Type | Method and Description |
|---|---|
void |
doWork(Work work)
Executes the work, the call blocks until the work completes
|
void |
doWork(Work work,
long startTimeout,
ExecutionContext ctx,
WorkListener listener)
Executes the work, the call blocks until the work completes
|
void |
scheduleWork(Work work)
Executes the work, the call returns immediatley
|
void |
scheduleWork(Work work,
long startTimeout,
ExecutionContext ctx,
WorkListener listener)
Executes the work, the call returns immediately
|
long |
startWork(Work work)
Executes the work, the call blocks until the work starts
|
long |
startWork(Work work,
long startTimeout,
ExecutionContext ctx,
WorkListener listener)
Executes the work, the call blocks until the work starts
|
static final long UNKNOWN
static final long IMMEDIATE
static final long INDEFINITE
void doWork(Work work) throws WorkException
work - the workWorkException - a generic errorWorkRejectedException - if the work is rejectedWorkCompletedException - if the work completes with an exceptionvoid doWork(Work work, long startTimeout, ExecutionContext ctx, WorkListener listener) throws WorkException
work - the workstartTimeout - the wait before executionctx - the execution contextlistener - the work listenerWorkException - a generic errorWorkRejectedException - if the work is rejectedWorkCompletedException - if the work completes with an exceptionlong startWork(Work work) throws WorkException
work - the workWorkException - a generic errorWorkRejectedException - if the work is rejectedlong startWork(Work work, long startTimeout, ExecutionContext ctx, WorkListener listener) throws WorkException
work - the workstartTimeout - the wait before executionctx - the execution contextlistener - the work listenerWorkException - a generic errorWorkRejectedException - if the work is rejectedvoid scheduleWork(Work work) throws WorkException
work - the workWorkException - a generic errorWorkRejectedException - if the work is rejectedvoid scheduleWork(Work work, long startTimeout, ExecutionContext ctx, WorkListener listener) throws WorkException
work - the workstartTimeout - the wait before executionctx - the execution contextlistener - the work listenerWorkException - a generic errorWorkRejectedException - if the work is rejectedCopyright © 2012 JBoss by Red Hat. All Rights Reserved.