Class LazyThreadFactory
java.lang.Object
org.jgroups.util.DefaultThreadFactory
org.jgroups.util.LazyThreadFactory
- All Implemented Interfaces:
ThreadFactory, ThreadFactory, ThreadManager
Lazily names threads: whenever the address or cluster name is changed, all threads are renamed
- Version:
- $Id: LazyThreadFactory.java,v 1.1.2.3 2008/06/17 15:30:31 belaban Exp $
- Author:
- Bela Ban
-
Field Summary
Fields inherited from class DefaultThreadFactory
address, baseName, clusterName, counter, createDaemons, group, includeClusterName, includeLocalAddress, threadDecorator, use_numbering -
Constructor Summary
ConstructorsConstructorDescriptionLazyThreadFactory(ThreadGroup group, String baseName, boolean createDaemons) LazyThreadFactory(ThreadGroup group, String baseName, boolean createDaemons, boolean use_numbering) -
Method Summary
Modifier and TypeMethodDescriptionnewThread(ThreadGroup group, Runnable r, String name) protected voidvoidsetAddress(String address) voidsetClusterName(String cluster_name) Methods inherited from class DefaultThreadFactory
getThreadDecorator, newThread, newThread, newThread, renameThread, renameThread, renameThread, renameThread, setIncludeClusterName, setPattern, setThreadDecorator
-
Constructor Details
-
LazyThreadFactory
-
LazyThreadFactory
public LazyThreadFactory(ThreadGroup group, String baseName, boolean createDaemons, boolean use_numbering)
-
-
Method Details
-
newThread
- Specified by:
newThreadin interfaceThreadFactory- Overrides:
newThreadin classDefaultThreadFactory
-
setAddress
- Specified by:
setAddressin interfaceThreadFactory- Overrides:
setAddressin classDefaultThreadFactory
-
setClusterName
- Specified by:
setClusterNamein interfaceThreadFactory- Overrides:
setClusterNamein classDefaultThreadFactory
-
renameThreads
protected void renameThreads()
-