de.netseeker.ejoe.concurrent
Class ThreadPoolFactory

java.lang.Object
  extended by de.netseeker.ejoe.concurrent.ThreadPoolFactory

public class ThreadPoolFactory
extends java.lang.Object

A factory producing ThreadPools. The factory will produce EJOEs default ThreadPool implementation for Java < 1.5.0 and a Executor-based implementation for Java >= 1.5.0.

Since:
0.3.9.1
Author:
netseeker

Constructor Summary
ThreadPoolFactory()
           
 
Method Summary
static ThreadService createFixedThreadPool(int size)
          Creates a new ThreadPool with a fixed size, the worker threads in the pool will belong to the ThreadGroup of the caller.
static ThreadService createFixedThreadPool(int size, java.lang.ThreadGroup group)
          Creates a new ThreadPool with a fixed size, the worker threads in the pool will belong to the given ThreadGroup.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadPoolFactory

public ThreadPoolFactory()
Method Detail

createFixedThreadPool

public static ThreadService createFixedThreadPool(int size,
                                                  java.lang.ThreadGroup group)
Creates a new ThreadPool with a fixed size, the worker threads in the pool will belong to the given ThreadGroup.

Parameters:
size - limit of the pool
group - ThreadGroup to which the workers will belong to.
Returns:
a new fix-sized ThreadPool

createFixedThreadPool

public static ThreadService createFixedThreadPool(int size)
Creates a new ThreadPool with a fixed size, the worker threads in the pool will belong to the ThreadGroup of the caller.

Parameters:
size - size limit of the pool
Returns:


Copyright © 2005-2007 netseeker. All Rights Reserved.