Class DaemonThreadFactory

java.lang.Object
io.opentelemetry.sdk.internal.DaemonThreadFactory
All Implemented Interfaces:
ThreadFactory

public final class DaemonThreadFactory extends Object implements ThreadFactory
A ThreadFactory that delegates to Executors.defaultThreadFactory() and marks all threads as daemon.

This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.

  • Constructor Details

    • DaemonThreadFactory

      public DaemonThreadFactory(String namePrefix)
    • DaemonThreadFactory

      public DaemonThreadFactory(String namePrefix, boolean propagateContextForTesting)
      DaemonThreadFactory's constructor.
      Parameters:
      namePrefix - Used when setting the new thread's name.
      propagateContextForTesting - For tests only. When enabled, the current thread's Context will be passed over to the new threads, this is useful for validating scenarios where context propagation is available through bytecode instrumentation.
  • Method Details