Class DefaultThreadFactory

java.lang.Object
org.infinispan.factories.threads.DefaultThreadFactory
All Implemented Interfaces:
ThreadFactory
Direct Known Subclasses:
BlockingThreadFactory, NonBlockingThreadFactory

public class DefaultThreadFactory extends Object implements ThreadFactory
Thread factory based on JBoss Thread's JBossThreadFactory.
Since:
7.0
Author:
Galder ZamarreƱo
  • Field Details

  • Constructor Details

    • DefaultThreadFactory

      public DefaultThreadFactory(ThreadGroup threadGroup, int initialPriority, String threadNamePattern, String node, String component)
      Construct a new instance. The access control context of the calling thread will be the one used to create new threads if a security manager is installed.
      Parameters:
      threadGroup - the thread group to assign threads to by default (may be null)
      initialPriority - the initial thread priority, or null to use the thread group's setting
      threadNamePattern - the name pattern string
    • DefaultThreadFactory

      public DefaultThreadFactory(String name, ThreadGroup threadGroup, int initialPriority, String threadNamePattern, String node, String component)
      Construct a new instance. The access control context of the calling thread will be the one used to create new threads if a security manager is installed.
      Parameters:
      name - the name of this thread factory (may be null)
      threadGroup - the thread group to assign threads to by default (may be null)
      initialPriority - the initial thread priority, or null to use the thread group's setting
      threadNamePattern - the name pattern string
  • Method Details

    • getName

      public String getName()
    • setNode

      public void setNode(String node)
    • setComponent

      public void setComponent(String component)
    • threadNamePattern

      public String threadNamePattern()
    • threadGroup

      public ThreadGroup threadGroup()
    • initialPriority

      public int initialPriority()
    • useVirtualThread

      public void useVirtualThread(boolean useVirtualThreads)
    • newThread

      public Thread newThread(Runnable target)
      Specified by:
      newThread in interface ThreadFactory