public class DefaultThreadFactory extends java.lang.Object implements ThreadFactory
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
address |
protected java.lang.String |
baseName |
protected java.lang.String |
clusterName |
protected short |
counter |
protected boolean |
createDaemons |
protected boolean |
includeClusterName |
protected boolean |
includeLocalAddress |
protected boolean |
use_numbering |
Constructor and Description |
---|
DefaultThreadFactory(java.lang.String baseName,
boolean createDaemons) |
DefaultThreadFactory(java.lang.String baseName,
boolean createDaemons,
boolean use_numbering) |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
getNewThreadName(java.lang.String base_name,
java.lang.String addr,
java.lang.String cluster_name) |
protected java.lang.String |
getThreadName(java.lang.String base_name,
java.lang.Thread thread,
java.lang.String addr,
java.lang.String cluster_name) |
java.lang.Thread |
newThread(java.lang.Runnable r) |
java.lang.Thread |
newThread(java.lang.Runnable r,
java.lang.String name) |
protected java.lang.Thread |
newThread(java.lang.Runnable r,
java.lang.String name,
java.lang.String addr,
java.lang.String cluster_name) |
java.lang.Thread |
newThread(java.lang.ThreadGroup group,
java.lang.Runnable r,
java.lang.String name) |
void |
renameThread(java.lang.String base_name,
java.lang.Thread thread) |
void |
renameThread(java.lang.String base_name,
java.lang.Thread thread,
java.lang.String addr,
java.lang.String cluster_name)
Names a thread according to base_name, cluster name and local address.
|
void |
renameThread(java.lang.Thread thread) |
void |
setAddress(java.lang.String address) |
void |
setClusterName(java.lang.String channelName) |
void |
setIncludeClusterName(boolean includeClusterName) |
void |
setPattern(java.lang.String pattern) |
protected final java.lang.String baseName
protected final boolean createDaemons
protected final boolean use_numbering
protected short counter
protected boolean includeClusterName
protected java.lang.String clusterName
protected boolean includeLocalAddress
protected java.lang.String address
public DefaultThreadFactory(java.lang.String baseName, boolean createDaemons)
public DefaultThreadFactory(java.lang.String baseName, boolean createDaemons, boolean use_numbering)
public void setPattern(java.lang.String pattern)
public void setIncludeClusterName(boolean includeClusterName)
public void setClusterName(java.lang.String channelName)
public void setAddress(java.lang.String address)
public java.lang.Thread newThread(java.lang.Runnable r, java.lang.String name)
public java.lang.Thread newThread(java.lang.Runnable r)
newThread
in interface java.util.concurrent.ThreadFactory
public java.lang.Thread newThread(java.lang.ThreadGroup group, java.lang.Runnable r, java.lang.String name)
protected java.lang.Thread newThread(java.lang.Runnable r, java.lang.String name, java.lang.String addr, java.lang.String cluster_name)
public void renameThread(java.lang.String base_name, java.lang.Thread thread)
public void renameThread(java.lang.String base_name, java.lang.Thread thread, java.lang.String addr, java.lang.String cluster_name)
base_name
- thread
- addr
- cluster_name
- public void renameThread(java.lang.Thread thread)
protected java.lang.String getThreadName(java.lang.String base_name, java.lang.Thread thread, java.lang.String addr, java.lang.String cluster_name)
protected java.lang.String getNewThreadName(java.lang.String base_name, java.lang.String addr, java.lang.String cluster_name)
Copyright © 1998-2020 Red Hat. All Rights Reserved.