akka.dispatch
Class ThreadPoolConfigBuilder
java.lang.Object
akka.dispatch.ThreadPoolConfigBuilder
- All Implemented Interfaces:
- java.io.Serializable, scala.Equals, scala.Product
public class ThreadPoolConfigBuilder
- extends java.lang.Object
- implements scala.Product, scala.Serializable
A DSL to configure and create a MessageDispatcher with a ThreadPoolExecutor
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface scala.Product |
productArity, productElement, productIterator, productPrefix |
Methods inherited from interface scala.Equals |
canEqual, equals |
ThreadPoolConfigBuilder
public ThreadPoolConfigBuilder(ThreadPoolConfig config)
config
public ThreadPoolConfig config()
withNewThreadPoolWithCustomBlockingQueue
public ThreadPoolConfigBuilder withNewThreadPoolWithCustomBlockingQueue(scala.Function0<java.util.concurrent.BlockingQueue<java.lang.Runnable>> newQueueFactory)
withNewThreadPoolWithCustomBlockingQueue
public ThreadPoolConfigBuilder withNewThreadPoolWithCustomBlockingQueue(java.util.concurrent.BlockingQueue<java.lang.Runnable> queue)
withNewThreadPoolWithLinkedBlockingQueueWithUnboundedCapacity
public ThreadPoolConfigBuilder withNewThreadPoolWithLinkedBlockingQueueWithUnboundedCapacity()
withNewThreadPoolWithLinkedBlockingQueueWithCapacity
public ThreadPoolConfigBuilder withNewThreadPoolWithLinkedBlockingQueueWithCapacity(int capacity)
withNewThreadPoolWithSynchronousQueueWithFairness
public ThreadPoolConfigBuilder withNewThreadPoolWithSynchronousQueueWithFairness(boolean fair)
withNewThreadPoolWithArrayBlockingQueueWithCapacityAndFairness
public ThreadPoolConfigBuilder withNewThreadPoolWithArrayBlockingQueueWithCapacityAndFairness(int capacity,
boolean fair)
setCorePoolSize
public ThreadPoolConfigBuilder setCorePoolSize(int size)
setMaxPoolSize
public ThreadPoolConfigBuilder setMaxPoolSize(int size)
setCorePoolSizeFromFactor
public ThreadPoolConfigBuilder setCorePoolSizeFromFactor(int min,
double multiplier,
int max)
setMaxPoolSizeFromFactor
public ThreadPoolConfigBuilder setMaxPoolSizeFromFactor(int min,
double multiplier,
int max)
setKeepAliveTimeInMillis
public ThreadPoolConfigBuilder setKeepAliveTimeInMillis(long time)
setKeepAliveTime
public ThreadPoolConfigBuilder setKeepAliveTime(scala.concurrent.duration.Duration time)
setAllowCoreThreadTimeout
public ThreadPoolConfigBuilder setAllowCoreThreadTimeout(boolean allow)
setQueueFactory
public ThreadPoolConfigBuilder setQueueFactory(scala.Function0<java.util.concurrent.BlockingQueue<java.lang.Runnable>> newQueueFactory)
configure
public ThreadPoolConfigBuilder configure(scala.collection.Seq<scala.Option<scala.Function1<ThreadPoolConfigBuilder,ThreadPoolConfigBuilder>>> fs)