Uses of Class
org.silverpeas.core.thread.ManagedThreadPool.ExecutionConfig
-
Packages that use ManagedThreadPool.ExecutionConfig Package Description org.silverpeas.core.thread Provides an engine to manage multi-threaded treatments in Silverpeas. -
-
Uses of ManagedThreadPool.ExecutionConfig in org.silverpeas.core.thread
Methods in org.silverpeas.core.thread that return ManagedThreadPool.ExecutionConfig Modifier and Type Method Description static ManagedThreadPool.ExecutionConfigManagedThreadPool.ExecutionConfig. defaultConfig()Gets an instance of a default execution configuration.ManagedThreadPool.ExecutionConfigManagedThreadPool.ExecutionConfig. killThreadsAfterTimeout()By default the caller get again the control after the timeout whileRunnablethreads continue to run.static ManagedThreadPool.ExecutionConfigManagedThreadPool.ExecutionConfig. maxThreadPoolSizeOf(int maxThreadPoolSize)Gets an instance of an execution configuration with a specified maximum pool of thread.
This is only useful when invokingCallableinstances.static ManagedThreadPool.ExecutionConfigManagedThreadPool.ExecutionConfig. timeoutOf(long timeout)Gets an instance of an execution configuration with a specified timeout in milliseconds.ManagedThreadPool.ExecutionConfigManagedThreadPool.ExecutionConfig. withMaxThreadPoolSizeOf(int maxThreadPoolSize)Sets a maximum size of the pool of threads.
This is only useful when invokingCallableinstances.ManagedThreadPool.ExecutionConfigManagedThreadPool.ExecutionConfig. withTimeoutOf(long timeout)Sets a timeout in milliseconds after that the invocation process will give back hand.ManagedThreadPool.ExecutionConfigManagedThreadPool.ExecutionConfig. withTimeoutOf(long timeout, TimeUnit timeUnit)Sets a timeout after that the invocation process will give back hand.Methods in org.silverpeas.core.thread with parameters of type ManagedThreadPool.ExecutionConfig Modifier and Type Method Description <V> Future<V>ManagedThreadPool. invoke(Callable<V> callable, ManagedThreadPool.ExecutionConfig config)Invokes the givenCallableinstance into a managed thread.
If the application server has no more thread to supply, then the execution will wait until it exists one again available.<V> List<Future<V>>ManagedThreadPool. invoke(List<? extends Callable<V>> callables, ManagedThreadPool.ExecutionConfig config)Invokes the givenCallableinstances into managed threads.
EachCallableinstance will be used one managed thread.
If the application server has no more thread to supply, then the execution will wait until it exists one again available.
A difference with invokingRunnableinstances is that if a timeout is set the caller will get back the hand after the successful execution of all threads or after the timeout, but never before.voidManagedThreadPool. invokeAndAwaitTermination(List<? extends Runnable> runnables, ManagedThreadPool.ExecutionConfig config)voidManagedThreadPool. invokeAndAwaitTermination(Stream<? extends Runnable> runnables, ManagedThreadPool.ExecutionConfig config)Invokes the given stream ofRunnableinstances into a managed thread and waiting for the end of execution of all of it.
EachRunnableinstance in the stream will be used one managed thread.
If the application server has no more thread to supply, then the execution will wait until it exists one again available.
-