Package org.apache.pekko.dispatch
Class ThreadPoolConfigBuilder
- java.lang.Object
-
- org.apache.pekko.dispatch.ThreadPoolConfigBuilder
-
- All Implemented Interfaces:
java.io.Serializable
,scala.Equals
,scala.Product
public final class ThreadPoolConfigBuilder extends java.lang.Object implements scala.Product, java.io.Serializable
A DSL to configure and create a MessageDispatcher with a ThreadPoolExecutor- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ThreadPoolConfigBuilder(ThreadPoolConfig config)
-
Method Summary
-
-
-
Constructor Detail
-
ThreadPoolConfigBuilder
public ThreadPoolConfigBuilder(ThreadPoolConfig config)
-
-
Method Detail
-
apply
public static ThreadPoolConfigBuilder apply(ThreadPoolConfig config)
-
unapply
public static scala.Option<ThreadPoolConfig> unapply(ThreadPoolConfigBuilder x$0)
-
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)
-
setFixedPoolSize
public ThreadPoolConfigBuilder setFixedPoolSize(int size)
-
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.immutable.Seq<scala.Option<scala.Function1<ThreadPoolConfigBuilder,ThreadPoolConfigBuilder>>> fs)
-
copy
public ThreadPoolConfigBuilder copy(ThreadPoolConfig config)
-
copy$default$1
public ThreadPoolConfig copy$default$1()
-
productPrefix
public java.lang.String productPrefix()
- Specified by:
productPrefix
in interfacescala.Product
-
productArity
public int productArity()
- Specified by:
productArity
in interfacescala.Product
-
productElement
public java.lang.Object productElement(int x$1)
- Specified by:
productElement
in interfacescala.Product
-
productIterator
public scala.collection.Iterator<java.lang.Object> productIterator()
- Specified by:
productIterator
in interfacescala.Product
-
canEqual
public boolean canEqual(java.lang.Object x$1)
- Specified by:
canEqual
in interfacescala.Equals
-
productElementName
public java.lang.String productElementName(int x$1)
- Specified by:
productElementName
in interfacescala.Product
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object x$1)
- Specified by:
equals
in interfacescala.Equals
- Overrides:
equals
in classjava.lang.Object
-
-