Package org.infinispan.factories.threads
Class DefaultThreadFactory
- java.lang.Object
-
- org.infinispan.factories.threads.DefaultThreadFactory
-
- All Implemented Interfaces:
java.util.concurrent.ThreadFactory
- Direct Known Subclasses:
DefaultNonBlockingThreadFactory
public class DefaultThreadFactory extends java.lang.Object implements java.util.concurrent.ThreadFactory
Thread factory based on JBoss Thread's JBossThreadFactory.- Since:
- 7.0
- Author:
- Galder ZamarreƱo
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_PATTERN
-
Constructor Summary
Constructors Constructor Description DefaultThreadFactory(java.lang.String name, java.lang.ThreadGroup threadGroup, int initialPriority, java.lang.String threadNamePattern, java.lang.String node, java.lang.String component)
Construct a new instance.DefaultThreadFactory(java.lang.ThreadGroup threadGroup, int initialPriority, java.lang.String threadNamePattern, java.lang.String node, java.lang.String component)
Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Thread
actualThreadCreate(java.lang.ThreadGroup threadGroup, java.lang.Runnable target)
java.lang.String
getName()
int
initialPriority()
java.lang.Thread
newThread(java.lang.Runnable target)
void
setComponent(java.lang.String component)
void
setNode(java.lang.String node)
java.lang.ThreadGroup
threadGroup()
java.lang.String
threadNamePattern()
-
-
-
Field Detail
-
DEFAULT_PATTERN
public static final java.lang.String DEFAULT_PATTERN
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DefaultThreadFactory
public DefaultThreadFactory(java.lang.ThreadGroup threadGroup, int initialPriority, java.lang.String threadNamePattern, java.lang.String node, java.lang.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(java.lang.String name, java.lang.ThreadGroup threadGroup, int initialPriority, java.lang.String threadNamePattern, java.lang.String node, java.lang.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 Detail
-
getName
public java.lang.String getName()
-
setNode
public void setNode(java.lang.String node)
-
setComponent
public void setComponent(java.lang.String component)
-
threadNamePattern
public java.lang.String threadNamePattern()
-
threadGroup
public java.lang.ThreadGroup threadGroup()
-
initialPriority
public int initialPriority()
-
newThread
public java.lang.Thread newThread(java.lang.Runnable target)
- Specified by:
newThread
in interfacejava.util.concurrent.ThreadFactory
-
actualThreadCreate
protected java.lang.Thread actualThreadCreate(java.lang.ThreadGroup threadGroup, java.lang.Runnable target)
-
-