org.apache.sling.commons.threads
Interface ThreadPoolConfig

All Known Implementing Classes:
ModifiableThreadPoolConfig

public interface ThreadPoolConfig

The thread pool configuration.


Nested Class Summary
static class ThreadPoolConfig.ThreadPoolPolicy
          The thread pool policies.
static class ThreadPoolConfig.ThreadPriority
           
 
Method Summary
 ThreadPoolConfig.ThreadPoolPolicy getBlockPolicy()
          Return the block policy.
 java.util.concurrent.ThreadFactory getFactory()
          Return the thread pool factory.
 long getKeepAliveTime()
          Return the keep alive time.
 int getMaxPoolSize()
          Return the maximum pool size
 int getMinPoolSize()
          Return the minimum pool size.
 ThreadPoolConfig.ThreadPriority getPriority()
          Return the priority for the threads.
 int getQueueSize()
          Return the queue size.
 int getShutdownWaitTimeMs()
          Return the shutdown wait time in ms.
 boolean isDaemon()
          Return if daemon threads should be created.
 boolean isShutdownGraceful()
          Should this pool shutdown graceful.
 

Method Detail

getMinPoolSize

int getMinPoolSize()
Return the minimum pool size.

Returns:
The minimum pool size.

getMaxPoolSize

int getMaxPoolSize()
Return the maximum pool size

Returns:
The maximum pool size.

getQueueSize

int getQueueSize()
Return the queue size.

Returns:
The queue size.

getKeepAliveTime

long getKeepAliveTime()
Return the keep alive time.

Returns:
The keep alive time.

getBlockPolicy

ThreadPoolConfig.ThreadPoolPolicy getBlockPolicy()
Return the block policy.

Returns:
The block policy.

isShutdownGraceful

boolean isShutdownGraceful()
Should this pool shutdown graceful.

Returns:
true if the pool should shutdown graceful.

getShutdownWaitTimeMs

int getShutdownWaitTimeMs()
Return the shutdown wait time in ms. A value below 1 means no waiting at shutdown.

Returns:
The shutdown wait time in ms.

getFactory

java.util.concurrent.ThreadFactory getFactory()
Return the thread pool factory. A value of null means the default jvm thread pool factory is used.

Returns:
The thread pool factory or null

getPriority

ThreadPoolConfig.ThreadPriority getPriority()
Return the priority for the threads.

Returns:
The priority for the threads.

isDaemon

boolean isDaemon()
Return if daemon threads should be created.

Returns:
true if daemon threads should be created.


Copyright © 2007-2011 The Apache Software Foundation. All Rights Reserved.