C# Class Candor.Tasks.RepeatingWorkerRoleTask

A worker task that repeats on a specific interval.
Inheritance: WorkerRoleTask, IDisposable
Show file Open project: michael-lang/candor-common

Public Methods

Method Description
Dispose ( ) : void

Disposed of resources used by this monitor.

Initialize ( string name, NameValueCollection configValue ) : void

Initializes the provider with the specified values.

OnStart ( ) : void

Starts this worker roles work loop, typically with a timer, and then returns immediately.

OnStop ( ) : void

Stops the work loop and then returns when complete. Expect the process to terminate potentially immediately after this method returns.

OnWaitingPeriodElapsedAdvanced ( ) : IterationResult

Code to be executed everytime the waiting period elapses, but with controls to alter the flow of subsequent iterations. This gives more fine grained control to derived classes to follow different workloads on a custom schedule.

If this method is overridden, then the other OnWaitingPeriodElapsed method will never be called by this base class.

Ping ( ) : void

Pings the task to ensure that it is running.

Protected Methods

Method Description
CheckIn ( ) : void

The derived class can mark that it has reached an activity checkpoint to verify that it is still active.

If too much time passes before a check in or a release of a work period then the timer is restarted when this task is pinged.

RepeatingWorkerRoleTask ( ) : System

The default constructor.

Private Methods

Method Description
ClearTimer ( ) : void
Dispose ( bool disposing ) : void
OnWaitingPeriodElapsed ( ) : void
PauseTimer ( ) : void
ResetTimer ( ) : void
ResumeTimer ( IterationResult result ) : void
StartTimer ( ) : void
mainTimer__Elapsed ( object sender ) : void

Method Details

CheckIn() protected method

The derived class can mark that it has reached an activity checkpoint to verify that it is still active.
If too much time passes before a check in or a release of a work period then the timer is restarted when this task is pinged.
protected CheckIn ( ) : void
return void

Dispose() public method

Disposed of resources used by this monitor.
public Dispose ( ) : void
return void

Initialize() public method

Initializes the provider with the specified values.
public Initialize ( string name, NameValueCollection configValue ) : void
name string The name of the provider.
configValue System.Collections.Specialized.NameValueCollection Provider specific attributes.
return void

OnStart() public method

Starts this worker roles work loop, typically with a timer, and then returns immediately.
public OnStart ( ) : void
return void

OnStop() public method

Stops the work loop and then returns when complete. Expect the process to terminate potentially immediately after this method returns.
public OnStop ( ) : void
return void

OnWaitingPeriodElapsedAdvanced() public method

Code to be executed everytime the waiting period elapses, but with controls to alter the flow of subsequent iterations. This gives more fine grained control to derived classes to follow different workloads on a custom schedule.
If this method is overridden, then the other OnWaitingPeriodElapsed method will never be called by this base class.
public OnWaitingPeriodElapsedAdvanced ( ) : IterationResult
return IterationResult

Ping() public method

Pings the task to ensure that it is running.
public Ping ( ) : void
return void

RepeatingWorkerRoleTask() protected method

The default constructor.
protected RepeatingWorkerRoleTask ( ) : System
return System