|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbitronix.tm.twopc.executor.SyncExecutor
public class SyncExecutor
This implementation executes submitted jobs synchronously.
Constructor Summary | |
---|---|
SyncExecutor()
|
Method Summary | |
---|---|
boolean |
isDone(Object future)
Check if the thread pool has terminated the execution of the job represented by a future. |
void |
shutdown()
Shutdown the thead pool. |
Object |
submit(Job job)
Submit a job to be executed by the thread pool. |
void |
waitFor(Object future,
long timeout)
Wait for the job represented by the future to terminate. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SyncExecutor()
Method Detail |
---|
public Object submit(Job job)
Executor
submit
in interface Executor
job
- the Runnable
to execute.
Runnable
.public void waitFor(Object future, long timeout)
Executor
waitFor
in interface Executor
future
- the future representing the job as returned by Executor.submit(bitronix.tm.twopc.executor.Job)
.timeout
- if the job did not finish during the specified timeout in milliseconds, this method returns anyway.public boolean isDone(Object future)
Executor
isDone
in interface Executor
future
- the future representing the job as returned by Executor.submit(bitronix.tm.twopc.executor.Job)
.
public void shutdown()
Executor
shutdown
in interface Executor
shutdown
in interface Service
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |