C# Class DotNetWorkQueue.Queue.HeartBeatWorker

A class that will update the heart beat field for a work item
Inheritance: IHeartBeatWorker
Exibir arquivo Open project: blehnen/DotNetWorkQueue Class Usage Examples

Private Properties

Property Type Description
Dispose void
SendHeartBeat void
SendHeartBeatInternal void
SetCancel void

Public Methods

Method Description
Dispose ( ) : void

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

HeartBeatWorker ( IHeartBeatConfiguration configuration, IMessageContext context, ISendHeartBeat sendHeartBeat, IHeartBeatThreadPool threadPool, ILogFactory log, IWorkerHeartBeatNotificationFactory heartBeatNotificationFactory ) : System

Initializes a new instance of the HeartBeatWorker class.

Start ( ) : void

Starts this instance.

Stop ( ) : void

Stops this instance.

Stop is explicitly called when an error occurs, so that we can preserve the last heartbeat value. Implementations MUST ensure that stop blocks and does not return if the heartbeat is in the middle of updating.

Protected Methods

Method Description
ThrowIfDisposed ( [ name = "" ) : void

Throws an exception if this instance has been disposed.

Private Methods

Method Description
Dispose ( bool disposing ) : void
SendHeartBeat ( ) : void

Sends the heart beat.

SendHeartBeatInternal ( ) : void

Sends the heart beat.

SetCancel ( ) : void

Sets the cancel token to true

Method Details

Dispose() public method

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

HeartBeatWorker() public method

Initializes a new instance of the HeartBeatWorker class.
public HeartBeatWorker ( IHeartBeatConfiguration configuration, IMessageContext context, ISendHeartBeat sendHeartBeat, IHeartBeatThreadPool threadPool, ILogFactory log, IWorkerHeartBeatNotificationFactory heartBeatNotificationFactory ) : System
configuration IHeartBeatConfiguration The configuration.
context IMessageContext The context.
sendHeartBeat ISendHeartBeat The send heart beat.
threadPool IHeartBeatThreadPool The thread pool.
log ILogFactory The log.
heartBeatNotificationFactory IWorkerHeartBeatNotificationFactory The heart beat notification factory.
return System

Start() public method

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

Stop() public method

Stops this instance.
Stop is explicitly called when an error occurs, so that we can preserve the last heartbeat value. Implementations MUST ensure that stop blocks and does not return if the heartbeat is in the middle of updating.
public Stop ( ) : void
return void

ThrowIfDisposed() protected method

Throws an exception if this instance has been disposed.
protected ThrowIfDisposed ( [ name = "" ) : void
name [ The name.
return void