C# Class DotNetWorkQueue.ATaskScheduler

A task scheduler for IConsumerQueueScheduler
Inheritance: System.Threading.Tasks.TaskScheduler, ITaskScheduler
Exibir arquivo Open project: blehnen/DotNetWorkQueue Class Usage Examples

Public Methods

Method Description
AddTask ( System.Threading.Tasks.Task task ) : void

Adds a new task to the scheduler.

AddWorkGroup ( string name, int concurrencyLevel ) : IWorkGroup

Adds a new work group.

AddWorkGroup ( string name, int concurrencyLevel, int maxQueueSize ) : IWorkGroup

Adds a new work group.

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

RoomForNewWorkGroupTask ( IWorkGroup group ) : RoomForNewTaskResult

If true, the task scheduler has room for the specified work group task

Start ( ) : void

Starts this instance.

Subscribe ( ) : int

Informs the scheduler that a client is connected

UnSubscribe ( int id ) : void

Informs the scheduler that a client has disconnected

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Releases unmanaged and - optionally - managed resources.

Method Details

AddTask() public abstract method

Adds a new task to the scheduler.
public abstract AddTask ( System.Threading.Tasks.Task task ) : void
task System.Threading.Tasks.Task The task.
return void

AddWorkGroup() public abstract method

Adds a new work group.
public abstract AddWorkGroup ( string name, int concurrencyLevel ) : IWorkGroup
name string The name.
concurrencyLevel int The concurrency level.
return IWorkGroup

AddWorkGroup() public abstract method

Adds a new work group.
public abstract AddWorkGroup ( string name, int concurrencyLevel, int maxQueueSize ) : IWorkGroup
name string The name.
concurrencyLevel int The concurrency level.
maxQueueSize int Maximum size of the queue.
return IWorkGroup

Dispose() public method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
return void

Dispose() protected abstract method

Releases unmanaged and - optionally - managed resources.
protected abstract Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
return void

RoomForNewWorkGroupTask() public abstract method

If true, the task scheduler has room for the specified work group task
public abstract RoomForNewWorkGroupTask ( IWorkGroup group ) : RoomForNewTaskResult
group IWorkGroup The group.
return RoomForNewTaskResult

Start() public abstract method

Starts this instance.
public abstract Start ( ) : void
return void

Subscribe() public abstract method

Informs the scheduler that a client is connected
public abstract Subscribe ( ) : int
return int

UnSubscribe() public abstract method

Informs the scheduler that a client has disconnected
public abstract UnSubscribe ( int id ) : void
id int The client identifier.
return void