|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Task
A task for a thread pool.
| Field Summary | |
|---|---|
static int |
WAIT_FOR_COMPLETE
Synchronized task, wait for task to complete |
static int |
WAIT_FOR_START
Synchronized start, wait for task to start |
static int |
WAIT_NONE
Don't wait for task |
| Method Summary | |
|---|---|
void |
accepted(long time)
The task has been accepted |
void |
completed(long time,
Throwable t)
The task has been completed |
void |
execute()
Execute the task |
long |
getCompletionTimeout()
The time before the task must be completed |
int |
getPriority()
The priority of the task |
long |
getStartTimeout()
The time before the task must be accepted |
int |
getWaitType()
Get the type of wait |
void |
rejected(long time,
Throwable t)
The task has been rejected |
void |
started(long time)
The task has been started |
void |
stop()
Invoked by the threadpool when it wants to stop the task |
| Field Detail |
|---|
static final int WAIT_NONE
static final int WAIT_FOR_START
static final int WAIT_FOR_COMPLETE
| Method Detail |
|---|
int getWaitType()
int getPriority()
long getStartTimeout()
long getCompletionTimeout()
void execute()
void stop()
void accepted(long time)
time - the time taken to accept the task
void rejected(long time,
Throwable t)
time - the time taken to reject the taskthrowable - any error associated with the rejectionvoid started(long time)
time - the time taken to start the task
void completed(long time,
Throwable t)
time - the time taken to reject the taskthrowable - any error associated with the completion
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||