org.jgroups.util
Class LazyThreadFactory
java.lang.Object
org.jgroups.util.DefaultThreadFactory
org.jgroups.util.LazyThreadFactory
- All Implemented Interfaces:
- java.util.concurrent.ThreadFactory
public class LazyThreadFactory
- extends DefaultThreadFactory
Lazily names threads: whenever the address or cluster name is changed, all threads are renamed
- Author:
- Bela Ban
Constructor Summary |
LazyThreadFactory(java.lang.String baseName,
boolean createDaemons,
boolean use_numbering)
|
Method Summary |
java.lang.Thread |
newThread(java.lang.Runnable r)
|
java.lang.Thread |
newThread(java.lang.Runnable r,
java.lang.String name)
|
java.lang.Thread |
newThread(java.lang.ThreadGroup group,
java.lang.Runnable r,
java.lang.String name)
|
protected void |
renameThreads()
|
void |
setAddress(java.lang.String address)
|
void |
setClusterName(java.lang.String cluster_name)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LazyThreadFactory
public LazyThreadFactory(java.lang.String baseName,
boolean createDaemons,
boolean use_numbering)
newThread
public java.lang.Thread newThread(java.lang.Runnable r,
java.lang.String name)
- Overrides:
newThread
in class DefaultThreadFactory
newThread
public java.lang.Thread newThread(java.lang.Runnable r)
- Specified by:
newThread
in interface java.util.concurrent.ThreadFactory
- Overrides:
newThread
in class DefaultThreadFactory
newThread
public java.lang.Thread newThread(java.lang.ThreadGroup group,
java.lang.Runnable r,
java.lang.String name)
- Overrides:
newThread
in class DefaultThreadFactory
setAddress
public void setAddress(java.lang.String address)
- Overrides:
setAddress
in class DefaultThreadFactory
setClusterName
public void setClusterName(java.lang.String cluster_name)
- Overrides:
setClusterName
in class DefaultThreadFactory
renameThreads
protected void renameThreads()
Copyright © 1998-2012 Bela Ban / Red Hat. All Rights Reserved.