org.apache.sling.commons.threads
Class ThreadPoolConfig

java.lang.Object
  extended by org.apache.sling.commons.threads.ThreadPoolConfig

public final class ThreadPoolConfig
extends java.lang.Object

The ThreadPool configuration.

Version:
$Id: ThreadPoolConfig.java 653306 2008-05-05 06:31:05Z cziegeler $

Nested Class Summary
static class ThreadPoolConfig.ThreadPoolPolicy
          The thread pool policies.
static class ThreadPoolConfig.ThreadPriority
           
 
Constructor Summary
ThreadPoolConfig()
          Create a new default configuration.
ThreadPoolConfig(ThreadPoolConfig copy)
          Clone an existing configuration
 
Method Summary
protected  void checkWritable()
           
 ThreadPoolConfig.ThreadPoolPolicy getBlockPolicy()
           
 java.util.concurrent.ThreadFactory getFactory()
           
 long getKeepAliveTime()
           
 int getMaxPoolSize()
           
 int getMinPoolSize()
           
 ThreadPoolConfig.ThreadPriority getPriority()
           
 int getQueueSize()
           
 int getShutdownWaitTimeMs()
           
 boolean isDaemon()
           
 boolean isShutdownGraceful()
           
 void makeReadOnly()
          Make the configuration read-only.
 void setBlockPolicy(ThreadPoolConfig.ThreadPoolPolicy blockPolicy)
           
 void setDaemon(boolean isDaemon)
           
 void setFactory(java.util.concurrent.ThreadFactory factory)
           
 void setKeepAliveTime(long keepAliveTime)
           
 void setMaxPoolSize(int maxPoolSize)
           
 void setMinPoolSize(int minPoolSize)
           
 void setPriority(ThreadPoolConfig.ThreadPriority priority)
           
 void setQueueSize(int queueSize)
           
 void setShutdownGraceful(boolean shutdownGraceful)
           
 void setShutdownWaitTimeMs(int shutdownWaitTimeMs)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadPoolConfig

public ThreadPoolConfig()
Create a new default configuration.


ThreadPoolConfig

public ThreadPoolConfig(ThreadPoolConfig copy)
Clone an existing configuration

Parameters:
copy - The config to clone
Method Detail

checkWritable

protected void checkWritable()

makeReadOnly

public void makeReadOnly()
Make the configuration read-only.


getMinPoolSize

public int getMinPoolSize()

setMinPoolSize

public void setMinPoolSize(int minPoolSize)

getMaxPoolSize

public int getMaxPoolSize()

setMaxPoolSize

public void setMaxPoolSize(int maxPoolSize)

getQueueSize

public int getQueueSize()

setQueueSize

public void setQueueSize(int queueSize)

getKeepAliveTime

public long getKeepAliveTime()

setKeepAliveTime

public void setKeepAliveTime(long keepAliveTime)

getBlockPolicy

public ThreadPoolConfig.ThreadPoolPolicy getBlockPolicy()

setBlockPolicy

public void setBlockPolicy(ThreadPoolConfig.ThreadPoolPolicy blockPolicy)

isShutdownGraceful

public boolean isShutdownGraceful()

setShutdownGraceful

public void setShutdownGraceful(boolean shutdownGraceful)

getShutdownWaitTimeMs

public int getShutdownWaitTimeMs()

setShutdownWaitTimeMs

public void setShutdownWaitTimeMs(int shutdownWaitTimeMs)

getFactory

public java.util.concurrent.ThreadFactory getFactory()

setFactory

public void setFactory(java.util.concurrent.ThreadFactory factory)

getPriority

public ThreadPoolConfig.ThreadPriority getPriority()

setPriority

public void setPriority(ThreadPoolConfig.ThreadPriority priority)

isDaemon

public boolean isDaemon()

setDaemon

public void setDaemon(boolean isDaemon)


Copyright © 2007-2009. All Rights Reserved.