org.imgscalr
Class AsyncScalr.ServerThreadFactory

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

protected static class AsyncScalr.ServerThreadFactory
extends AsyncScalr.DefaultThreadFactory

An extension of the AsyncScalr.DefaultThreadFactory class that makes two changes to the execution Threads it generations:

  1. Threads are set to be daemon threads instead of user threads.
  2. Threads execute with a priority of Thread.MIN_PRIORITY to make them more compatible with server environment deployments.
This class is provided as a convenience for subclasses to use if they want this (common) customization to the Threads used internally by AsyncScalr to process images, but don't want to have to write the implementation.

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


Field Summary
 
Fields inherited from class org.imgscalr.AsyncScalr.DefaultThreadFactory
group, namePrefix, poolNumber, threadNumber
 
Constructor Summary
protected AsyncScalr.ServerThreadFactory()
           
 
Method Summary
 ThreadnewThread(Runnable r)
          Overridden to set daemon property to true and decrease the priority of the new thread to Thread.MIN_PRIORITY before returning it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsyncScalr.ServerThreadFactory

protected AsyncScalr.ServerThreadFactory()
Method Detail

newThread

public Thread newThread(Runnable r)
Overridden to set daemon property to true and decrease the priority of the new thread to Thread.MIN_PRIORITY before returning it.

Specified by:
newThread in interface ThreadFactory
Overrides:
newThread in class AsyncScalr.DefaultThreadFactory


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


NOTHING
NOTHING
Add the Maven Dependecy to your project: maven dependecy for com.amazonaws : aws-java-sdk : 1.3.14