Class GcpThreadFactory (1.11.0)

public final class GcpThreadFactory

Thread factory helper for grpc-gcp background executors.

Inheritance

java.lang.Object > GcpThreadFactory

Static Fields

USE_DAEMON_THREADS_PROPERTY

public static final String USE_DAEMON_THREADS_PROPERTY

System property to control daemon threads for grpc-gcp background executors.

Field Value
Type Description
String

Static Methods

newThreadFactory(String nameFormat)

public static ThreadFactory newThreadFactory(String nameFormat)

Creates a ThreadFactory that names threads and honors the daemon-thread setting.

Defaults to daemon threads to avoid keeping the JVM alive when only background work remains. Set -Dcom.google.cloud.grpc.use_daemon_threads=false to use non-daemon threads.

Parameter
Name Description
nameFormat String
Returns
Type Description
ThreadFactory