org.kuali.rice.ksb.messaging.threadpool
Class KSBThreadPoolImpl.KSBThreadFactory

java.lang.Object
  extended by org.kuali.rice.ksb.messaging.threadpool.KSBThreadPoolImpl.KSBThreadFactory
All Implemented Interfaces:
ThreadFactory
Enclosing class:
KSBThreadPoolImpl

private static class KSBThreadPoolImpl.KSBThreadFactory
extends Object
implements ThreadFactory

A simple ThreadFactory which names the thread as follows:

applicationId/KSB-pool-m-thread-n

Where applicationId is the id of the application running the thread pool, m is the sequence number of the factory and n is the sequence number of the thread within the factory.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Field Summary
private  ClassLoader contextClassLoader
           
private  ThreadFactory defaultThreadFactory
           
private static int factorySequence
           
private static int threadSequence
           
 
Constructor Summary
KSBThreadPoolImpl.KSBThreadFactory(ClassLoader contextClassLoader)
           
 
Method Summary
 Thread newThread(Runnable runnable)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factorySequence

private static int factorySequence

threadSequence

private static int threadSequence

defaultThreadFactory

private ThreadFactory defaultThreadFactory

contextClassLoader

private ClassLoader contextClassLoader
Constructor Detail

KSBThreadPoolImpl.KSBThreadFactory

public KSBThreadPoolImpl.KSBThreadFactory(ClassLoader contextClassLoader)
Method Detail

newThread

public Thread newThread(Runnable runnable)
Specified by:
newThread in interface ThreadFactory


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.