com.jaxfront.core.util
Class ThreadPool

java.lang.Object
  extended by com.jaxfront.core.util.ThreadPool

public class ThreadPool
extends java.lang.Object


Constructor Summary
ThreadPool()
           
ThreadPool(int corePoolSize, int maxPoolSize, long keepAliveTime)
           
 
Method Summary
static ThreadPool getInstance()
           
static void init(int corePoolSize, int maxPoolSize, long keepAliveTime)
           
static void main(java.lang.String[] args)
           
 void release()
           
 void runTask(java.lang.Runnable task)
          Here we add our jobs to working queue
 void setCorePoolSize(int corePoolSize)
           
 void setKeepAliveTime(long keepAliveTime)
           
 void setMaxPoolSize(int maxPoolSize)
           
 void shutDown()
          Shutdown the Threadpool if it's finished
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadPool

public ThreadPool()

ThreadPool

public ThreadPool(int corePoolSize,
                  int maxPoolSize,
                  long keepAliveTime)
Method Detail

getInstance

public static ThreadPool getInstance()

init

public static void init(int corePoolSize,
                        int maxPoolSize,
                        long keepAliveTime)

main

public static void main(java.lang.String[] args)

release

public void release()

runTask

public void runTask(java.lang.Runnable task)
Here we add our jobs to working queue

Parameters:
task - a Runnable task

setCorePoolSize

public void setCorePoolSize(int corePoolSize)

setKeepAliveTime

public void setKeepAliveTime(long keepAliveTime)

setMaxPoolSize

public void setMaxPoolSize(int maxPoolSize)

shutDown

public void shutDown()
Shutdown the Threadpool if it's finished