|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbitronix.tm.twopc.executor.ConcurrentExecutor
public class ConcurrentExecutor
Abstraction of the java.util.concurrent
JDK 1.5+ implementation.
Constructor Summary | |
---|---|
|
ConcurrentExecutor()
|
protected |
ConcurrentExecutor(java.lang.String[] implementations)
|
Method Summary | |
---|---|
boolean |
isDone(java.lang.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. |
java.lang.Object |
submit(Job job)
Submit a job to be executed by the thread pool. |
void |
waitFor(java.lang.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 ConcurrentExecutor()
protected ConcurrentExecutor(java.lang.String[] implementations)
Method Detail |
---|
public java.lang.Object submit(Job job)
Executor
submit
in interface Executor
job
- the Runnable
to execute.
Runnable
.public void waitFor(java.lang.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(java.lang.Object future)
Executor
isDone
in interface Executor
future
- the future representing the job as returned by Executor.submit(bitronix.tm.twopc.executor.Job)
.
public boolean isUsable()
Executor
BitronixRuntimeException
when called if this method returns false.
isUsable
in interface Executor
Executor
can be used, false otherwise.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 |