org.imgscalr
Class AsyncScalr.ServerThreadFactory
java.lang.Object
org.imgscalr.AsyncScalr.DefaultThreadFactory
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:
- Threads are set to be daemon threads instead of user threads.
- 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)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AsyncScalr.ServerThreadFactory
protected AsyncScalr.ServerThreadFactory()
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.