|
||||||||||
| 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. |
boolean |
isUsable()
Check if the thread pool can be used. |
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 Executorjob - the Runnable to execute.
Runnable.
public void waitFor(Object future,
long timeout)
Executor
waitFor in interface Executorfuture - 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 Executorfuture - the future representing the job as returned by Executor.submit(bitronix.tm.twopc.executor.Job).
public boolean isUsable()
ExecutorBitronixRuntimeException when called if this method returns false.
isUsable in interface ExecutorExecutor can be used, false otherwise.public void shutdown()
Executor
shutdown in interface Executorshutdown in interface Service
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||