Class TaskRunnerFactory
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.
If your OS/JVM combination has a good thread model, you may want to avoid using a thread pool to run tasks and use a DedicatedTaskRunner instead.
Inheritance
System.Object
TaskRunnerFactory
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Apache.NMS.ActiveMQ.Threads
Assembly: Apache.NMS.ActiveMQ.dll
Syntax
public class TaskRunnerFactory
Constructors
| Improve this Doc View SourceTaskRunnerFactory()
Declaration
public TaskRunnerFactory()
Fields
| Improve this Doc View SourcededicatedTaskRunner
Declaration
public bool dedicatedTaskRunner
Field Value
| Type | Description |
|---|---|
| System.Boolean |
maxIterationsPerRun
Declaration
public int maxIterationsPerRun
Field Value
| Type | Description |
|---|---|
| System.Int32 |
name
Declaration
public string name
Field Value
| Type | Description |
|---|---|
| System.String |
priority
Declaration
public ThreadPriority priority
Field Value
| Type | Description |
|---|---|
| System.Threading.ThreadPriority |
Methods
| Improve this Doc View SourceCreateTaskRunner(Task)
Declaration
public TaskRunner CreateTaskRunner(Task task)
Parameters
| Type | Name | Description |
|---|---|---|
| Task | task |
Returns
| Type | Description |
|---|---|
| TaskRunner |
CreateTaskRunner(Task, String)
Declaration
public TaskRunner CreateTaskRunner(Task task, string name)
Parameters
| Type | Name | Description |
|---|---|---|
| Task | task | |
| System.String | name |
Returns
| Type | Description |
|---|---|
| TaskRunner |
CreateTaskRunner(Task, String, ThreadPriority)
Declaration
public TaskRunner CreateTaskRunner(Task task, string name, ThreadPriority taskPriority)
Parameters
| Type | Name | Description |
|---|---|---|
| Task | task | |
| System.String | name | |
| System.Threading.ThreadPriority | taskPriority |
Returns
| Type | Description |
|---|---|
| TaskRunner |