public class CategorizedThreadFactory extends Object implements ThreadFactory
Modifier and Type | Field and Description |
---|---|
private String |
category |
private static org.slf4j.Logger |
log |
private String |
name |
private AtomicInteger |
threadCount |
private static Thread.UncaughtExceptionHandler |
UNCAUGHT_EXCEPTION_HANDLER
Exception handler for proxy threads.
|
private int |
uniqueServerGroupId |
Constructor and Description |
---|
CategorizedThreadFactory(String name,
String category,
int uniqueServerGroupId) |
private static final org.slf4j.Logger log
private final String name
private final String category
private final int uniqueServerGroupId
private AtomicInteger threadCount
private static final Thread.UncaughtExceptionHandler UNCAUGHT_EXCEPTION_HANDLER
public CategorizedThreadFactory(String name, String category, int uniqueServerGroupId)
name
- the user-supplied name of this proxycategory
- the type of threads this factory is creating (acceptor, client-to-proxy worker, proxy-to-server worker)uniqueServerGroupId
- a unique number for the server group creating this thread factory, to differentiate multiple proxy instances with the same namepublic Thread newThread(Runnable r)
newThread
in interface ThreadFactory
Copyright © 2009–2017 LittleShoot. All rights reserved.