Package org.infinispan.factories.threads
Class DefaultThreadFactory
java.lang.Object
org.infinispan.factories.threads.DefaultThreadFactory
- All Implemented Interfaces:
ThreadFactory
- Direct Known Subclasses:
BlockingThreadFactory
,NonBlockingThreadFactory
Thread factory based on JBoss Thread's JBossThreadFactory.
- Since:
- 7.0
- Author:
- Galder ZamarreƱo
-
Field Summary
-
Constructor Summary
ConstructorDescriptionDefaultThreadFactory
(String name, ThreadGroup threadGroup, int initialPriority, String threadNamePattern, String node, String component) Construct a new instance.DefaultThreadFactory
(ThreadGroup threadGroup, int initialPriority, String threadNamePattern, String node, String component) Construct a new instance. -
Method Summary
Modifier and TypeMethodDescriptiongetName()
int
void
setComponent
(String component) void
void
useVirtualThread
(boolean useVirtualThreads)
-
Field Details
-
DEFAULT_PATTERN
- See Also:
-
-
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 benull
)initialPriority
- the initial thread priority, ornull
to use the thread group's settingthreadNamePattern
- 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 benull
)threadGroup
- the thread group to assign threads to by default (may benull
)initialPriority
- the initial thread priority, ornull
to use the thread group's settingthreadNamePattern
- the name pattern string
-
-
Method Details
-
getName
-
setNode
-
setComponent
-
threadNamePattern
-
threadGroup
-
initialPriority
public int initialPriority() -
useVirtualThread
public void useVirtualThread(boolean useVirtualThreads) -
newThread
- Specified by:
newThread
in interfaceThreadFactory
-