org.apache.activemq.thread
Class TaskRunnerFactory

java.lang.Object
  extended by org.apache.activemq.thread.TaskRunnerFactory

public class TaskRunnerFactory
extends java.lang.Object

Manages the thread pool for long running tasks. Long running tasks are not always active but when they are active, they may need a few iterations of processing for them to become idle. The manager ensures that each task is processes but that no one task overtakes the system. This is kina like cooperative multitasking.

Version:
$Revision: 1.5 $

Constructor Summary
TaskRunnerFactory()
           
TaskRunnerFactory(java.lang.String name, int priority, boolean daemon, int maxIterationsPerRun)
           
 
Method Summary
protected  edu.emory.mathcs.backport.java.util.concurrent.ExecutorService createDefaultExecutor()
           
 TaskRunner createTaskRunner(Task task, java.lang.String name)
           
 void shutdown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TaskRunnerFactory

public TaskRunnerFactory()

TaskRunnerFactory

public TaskRunnerFactory(java.lang.String name,
                         int priority,
                         boolean daemon,
                         int maxIterationsPerRun)
Method Detail

shutdown

public void shutdown()

createTaskRunner

public TaskRunner createTaskRunner(Task task,
                                   java.lang.String name)

createDefaultExecutor

protected edu.emory.mathcs.backport.java.util.concurrent.ExecutorService createDefaultExecutor()


Copyright © 2011 Apache Software Foundation. All Rights Reserved.