Class DaemonThreadFactory

  • All Implemented Interfaces:
    ThreadFactory, ThreadFactory

    public class DaemonThreadFactory
    extends Object
    implements ThreadFactory
    DaemonThreadFactory is a ThreadFactory which produces daemon threads.
    Since:
    Coherence 3.6
    Author:
    mf 2010.05.12
    • Field Detail

      • m_sNamePrefix

        protected final String m_sNamePrefix
        The prefix to use for unnammed threads produced by the factory.
      • m_cNameSuffix

        protected final AtomicInteger m_cNameSuffix
        The thread name counter.
      • INSTANCE

        public static final DaemonThreadFactory INSTANCE
        A reuseable DaemonThreadFactory instance.
    • Constructor Detail

      • DaemonThreadFactory

        public DaemonThreadFactory()
        Construct a new DameonThreadFacotry.
      • DaemonThreadFactory

        public DaemonThreadFactory​(String sPrefix)
        Construct a new DameonThreadFacotry.
        Parameters:
        sPrefix - the prefix for unnamed threads
    • Method Detail

      • makeThread

        public Thread makeThread​(ThreadGroup group,
                                 Runnable runnable,
                                 String sName)
        Create a Thread with the specified group, runnable, and name.
        Specified by:
        makeThread in interface ThreadFactory
        Parameters:
        group - (optional) the thread's thread group
        runnable - (optional) the thread's runnable
        sName - (optional) the thread's name
        Returns:
        a new thread using the specified parameters