Class NamingThreadFactory

  • All Implemented Interfaces:
    java.util.concurrent.ThreadFactory

    public class NamingThreadFactory
    extends java.lang.Object
    implements java.util.concurrent.ThreadFactory
    A ThreadFactory that gives (non-standard) names to new threads. If a name is a IRunnableNameProvider, the name provided by IRunnableNameProvider.getRunnableName() will be used, otherwise the defaultName. The thread count (number of already created threads in this factory) will always be appended.
    • Constructor Detail

      • NamingThreadFactory

        public NamingThreadFactory​(java.lang.String poolName)
    • Method Detail

      • newThread

        public java.lang.Thread newThread​(java.lang.Runnable r)
        Specified by:
        newThread in interface java.util.concurrent.ThreadFactory
      • isCreateDaemonThreads

        public final boolean isCreateDaemonThreads()
      • setCreateDaemonThreads

        public final void setCreateDaemonThreads​(boolean createDaemonThreads)
      • getThreadCount

        public final int getThreadCount()
      • isAddPoolName

        public final boolean isAddPoolName()
      • setAddPoolName

        public final void setAddPoolName​(boolean addPoolName)