org.imgscalr
Class AsyncScalr.DefaultThreadFactory

java.lang.Object
  extended by org.imgscalr.AsyncScalr.DefaultThreadFactory
All Implemented Interfaces:
ThreadFactory
Direct Known Subclasses:
AsyncScalr.ServerThreadFactory
Enclosing class:
AsyncScalr

protected static class AsyncScalr.DefaultThreadFactory
extends Object
implements ThreadFactory

Default ThreadFactory used by the internal ExecutorService to creates execution Threads for image scaling.

More or less a copy of the hidden class backing the Executors.defaultThreadFactory() method, but exposed here to make it easier for implementors to extend and customize.

Since:
4.0
Author:
Doug Lea, Riyad Kalla (software@thebuzzmedia.com)

Field Summary
protected  ThreadGroup group
           
protected  String namePrefix
           
protected static AtomicInteger poolNumber
           
protected  AtomicInteger threadNumber
           
 
Method Summary
 Thread newThread(Runnable r)
          Used to create a Thread capable of executing the given Runnable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

poolNumber

protected static final AtomicInteger poolNumber

group

protected final ThreadGroup group

threadNumber

protected final AtomicInteger threadNumber

namePrefix

protected final String namePrefix
Method Detail

newThread

public Thread newThread(Runnable r)
Used to create a Thread capable of executing the given Runnable.

Thread created by this factory are utilized by the parent ExecutorService when processing queued up scale operations.

Specified by:
newThread in interface ThreadFactory


Copyright © 2012 The Buzz Media, LLC. All Rights Reserved.