org.jgroups.util

## Class LazyThreadFactory

- java.lang.Object
- - org.jgroups.util.DefaultThreadFactory
  - - org.jgroups.util.LazyThreadFactory

All Implemented Interfaces:
  java.util.concurrent.ThreadFactory, ThreadManager

    public class LazyThreadFactory
    extends DefaultThreadFactory

Lazily names threads: whenever the address or cluster name is changed, all threads are renamed

Author:
  Bela Ban

### Field Summary

### Fields inherited from class org.jgroups.util.DefaultThreadFactory

`address, baseName, clusterName, counter, createDaemons, group, includeClusterName, includeLocalAddress, threadDecorator, use_numbering`

### Constructor Summary

Constructors
Constructor and Description
`LazyThreadFactory(java.lang.ThreadGroup group, java.lang.String baseName, boolean createDaemons)`
`LazyThreadFactory(java.lang.ThreadGroup group, java.lang.String baseName, boolean createDaemons, boolean use_numbering)`

### Method Summary

Methods
`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 org.jgroups.util.DefaultThreadFactory

`getThreadDecorator, newThread, newThread, newThread, renameThread, renameThread, renameThread, renameThread, setIncludeClusterName, setPattern, setThreadDecorator`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### LazyThreadFactory

    public LazyThreadFactory(java.lang.ThreadGroup group,
                     java.lang.String baseName,
                     boolean createDaemons)

#### LazyThreadFactory

    public LazyThreadFactory(java.lang.ThreadGroup group,
                     java.lang.String baseName,
                     boolean createDaemons,
                     boolean use_numbering)

### Method Detail

#### 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()