|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectmandala.rami.impl.ThreadPooledPolicy
Concurrent, thredpooled implementation of the
AsynchronousPolicy interface.
This implementation uses the MethodInvoker for its method
invocation implementation and the ThreadPool utility for better
performance.
ConcurrentSemantic,
AsynchronousPolicy,
MethodInvoker,
ThreadPool,
Serialized Form| Field Summary | |
protected ThreadPool |
threadPool
The thread pool used. |
| Constructor Summary | |
ThreadPooledPolicy()
Creates a new ThreadPooledPolicy instance using the
default thread pool. |
|
ThreadPooledPolicy(ThreadPool threadPool)
Creates a new ThreadPooledPolicy instance with a
specified thread pool. |
|
| Method Summary | |
Cancelable |
call(Object object,
FutureServer futureServer)
Asynchronous implementation of a method invocation. |
static ThreadPool |
getDefaultThreadPool()
Returns the default thread pool used if non is given when instanciating this class. |
ThreadPool |
getThreadPool()
Returns the thread pool used by this instance. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected transient ThreadPool threadPool
The thread pool used.
| Constructor Detail |
public ThreadPooledPolicy()
Creates a new ThreadPooledPolicy instance using the
default thread pool.
getDefaultThreadPool()public ThreadPooledPolicy(ThreadPool threadPool)
Creates a new ThreadPooledPolicy instance with a
specified thread pool.
If the given thread pool has not been started, it is started.
threadPool - the thread pool to use.ThreadPool,
ThreadPool.start(),
ThreadPool.isStarted()| Method Detail |
public static ThreadPool getDefaultThreadPool()
Returns the default thread pool used if non is given when instanciating this class.
ThreadPool
public Cancelable call(Object object,
FutureServer futureServer)
Asynchronous implementation of a method invocation.
This implementation uses the ThreadPool and the
MethodInvoker class.
call in interface AsynchronousPolicyobject - the object on which the method is to be invoked.futureServer - a FutureServer value
MethodInvoker,
FutureServer,
ThreadPoolpublic ThreadPool getThreadPool()
Returns the thread pool used by this instance.
ThreadPool valueThreadPoolpublic String toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||