Class ExecutorThreadPool

    • Constructor Detail

      • ExecutorThreadPool

        public ExecutorThreadPool()
        Deprecated.
      • ExecutorThreadPool

        public ExecutorThreadPool​(int maxThreads)
        Deprecated.
      • ExecutorThreadPool

        public ExecutorThreadPool​(int maxThreads,
                                  int minThreads)
        Deprecated.
      • ExecutorThreadPool

        public ExecutorThreadPool​(int maxThreads,
                                  int minThreads,
                                  java.util.concurrent.BlockingQueue<java.lang.Runnable> queue)
        Deprecated.
      • ExecutorThreadPool

        public ExecutorThreadPool​(java.util.concurrent.ThreadPoolExecutor executor)
        Deprecated.
      • ExecutorThreadPool

        public ExecutorThreadPool​(java.util.concurrent.ThreadPoolExecutor executor,
                                  int reservedThreads)
        Deprecated.
      • ExecutorThreadPool

        public ExecutorThreadPool​(java.util.concurrent.ThreadPoolExecutor executor,
                                  int reservedThreads,
                                  java.lang.ThreadGroup group)
        Deprecated.
    • Method Detail

      • getName

        @ManagedAttribute("name of this thread pool")
        public java.lang.String getName()
        Deprecated.
        Returns:
        the name of the this thread pool
      • setName

        public void setName​(java.lang.String name)
        Deprecated.
        Parameters:
        name - the name of this thread pool, used to name threads
      • getIdleTimeout

        @ManagedAttribute("maximum time a thread may be idle in ms")
        public int getIdleTimeout()
        Deprecated.
        Returns:
        the maximum thread idle time in ms.
        See Also:
        setIdleTimeout(int)
      • setIdleTimeout

        public void setIdleTimeout​(int idleTimeout)
        Deprecated.

        Sets the maximum thread idle time in ms.

        Threads that are idle for longer than this period may be stopped.

        Parameters:
        idleTimeout - the maximum thread idle time in ms.
        See Also:
        getIdleTimeout()
      • getReservedThreads

        @ManagedAttribute("the number of reserved threads in the pool")
        public int getReservedThreads()
        Deprecated.
        Returns:
        number of reserved threads or -1 to indicate that the number is heuristically determined
        See Also:
        setReservedThreads(int)
      • setReservedThreads

        public void setReservedThreads​(int reservedThreads)
        Deprecated.
        Sets the number of reserved threads.
        Parameters:
        reservedThreads - number of reserved threads or -1 to determine the number heuristically
        See Also:
        getReservedThreads()
      • setThreadsPriority

        public void setThreadsPriority​(int priority)
        Deprecated.
      • getThreadsPriority

        public int getThreadsPriority()
        Deprecated.
      • isDaemon

        @ManagedAttribute("whether this thread pool uses daemon threads")
        public boolean isDaemon()
        Deprecated.
        Returns:
        whether this thread pool uses daemon threads
        See Also:
        setDaemon(boolean)
      • setDaemon

        public void setDaemon​(boolean daemon)
        Deprecated.
        Parameters:
        daemon - whether this thread pool uses daemon threads
        See Also:
        Thread.setDaemon(boolean)
      • isDetailedDump

        @ManagedAttribute("reports additional details in the dump")
        public boolean isDetailedDump()
        Deprecated.
      • setDetailedDump

        public void setDetailedDump​(boolean detailedDump)
        Deprecated.
      • getThreads

        @ManagedAttribute("number of threads in the pool")
        public int getThreads()
        Deprecated.
        Specified by:
        getThreads in interface ThreadPool
        Returns:
        The total number of threads currently in the pool
      • getIdleThreads

        @ManagedAttribute("number of idle threads in the pool")
        public int getIdleThreads()
        Deprecated.
        Specified by:
        getIdleThreads in interface ThreadPool
        Returns:
        The number of idle threads in the pool
      • execute

        public void execute​(java.lang.Runnable command)
        Deprecated.
        Specified by:
        execute in interface java.util.concurrent.Executor
        Specified by:
        execute in interface TryExecutor
      • tryExecute

        public boolean tryExecute​(java.lang.Runnable task)
        Deprecated.
        Description copied from interface: TryExecutor
        Attempt to execute a task.
        Specified by:
        tryExecute in interface TryExecutor
        Parameters:
        task - The task to be executed
        Returns:
        True IFF the task has been given directly to a thread to execute. The task cannot be queued pending the later availability of a Thread.
      • join

        public void join()
                  throws java.lang.InterruptedException
        Deprecated.
        Description copied from interface: ThreadPool
        Blocks until the thread pool is stopped.
        Specified by:
        join in interface ThreadPool
        Throws:
        java.lang.InterruptedException - if thread was interrupted
      • dump

        public void dump​(java.lang.Appendable out,
                         java.lang.String indent)
                  throws java.io.IOException
        Deprecated.
        Description copied from interface: Dumpable
        Dump this object (and children) into an Appendable using the provided indent after any new lines. The indent should not be applied to the first object dumped.
        Specified by:
        dump in interface Dumpable
        Overrides:
        dump in class ContainerLifeCycle
        Parameters:
        out - The appendable to dump to
        indent - The indent to apply after any new lines.
        Throws:
        java.io.IOException - if unable to write to Appendable