com.google.cloud.bigtable.util
Class ThreadUtil
- java.lang.Object
-
- com.google.cloud.bigtable.util.ThreadUtil
-
public class ThreadUtil extends Object
Creates aThreadFactory
that's safe to use in App Engine.This class copies code that originates in
GrpcUtil.getThreadFactory(String, boolean)
.
-
-
Constructor Summary
Constructors Constructor and Description ThreadUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static ThreadFactory
getThreadFactory(String nameFormat, boolean daemon)
Get aThreadFactory
suitable for use in the current environment.
-
-
-
Method Detail
-
getThreadFactory
public static ThreadFactory getThreadFactory(String nameFormat, boolean daemon)
Get aThreadFactory
suitable for use in the current environment.- Parameters:
nameFormat
- to apply to threads created by the factory.daemon
-true
if the threads the factory creates are daemon threads,false
otherwise.- Returns:
- a
ThreadFactory
.
-
-