Class NamedThreadFactory
- java.lang.Object
-
- com.didiglobal.booster.instrument.NamedThreadFactory
-
- All Implemented Interfaces:
java.util.concurrent.ThreadFactory
public class NamedThreadFactory extends java.lang.Object implements java.util.concurrent.ThreadFactory
-
-
Constructor Summary
Constructors Constructor Description NamedThreadFactory(java.lang.String name)NamedThreadFactory(java.util.concurrent.ThreadFactory factory, java.lang.String name)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.concurrent.ThreadFactorynewInstance(java.lang.String prefix)Used byThreadTransformerfor thread renamingstatic java.util.concurrent.ThreadFactorynewInstance(java.util.concurrent.ThreadFactory factory, java.lang.String prefix)Used byThreadTransformerfor thread renamingjava.lang.ThreadnewThread(java.lang.Runnable r)
-
-
-
Method Detail
-
newInstance
public static java.util.concurrent.ThreadFactory newInstance(java.lang.String prefix)
Used byThreadTransformerfor thread renaming- Parameters:
prefix- the prefix of name- Returns:
- an instance of ThreadFactory
-
newInstance
public static java.util.concurrent.ThreadFactory newInstance(java.util.concurrent.ThreadFactory factory, java.lang.String prefix)Used byThreadTransformerfor thread renaming- Parameters:
factory- the factory delegateprefix- the prefix of name- Returns:
- an instance of ThreadFactory
-
newThread
public java.lang.Thread newThread(java.lang.Runnable r)
- Specified by:
newThreadin interfacejava.util.concurrent.ThreadFactory
-
-