public abstract class QuickIOTransferJob : IQuickIOTransferJob
A job is a defined task is performed by the method Run Here, you can define the content of the task itself.
private Int32 _currentRetryCount
private Int32 _priorityLevel
End
This event is raised at the end Run
public End
Error
This event is triggered if Run has an error
public Error
RunRaised
This event is raised when Run is called
public RunRaised
QuickIOTransferJob(IQuickIOTransferObserver observer, Int32 priorityLevel)
Creates a new instance of QuickIOTransferJob
protected void QuickIOTransferJob(IQuickIOTransferObserver observer, Int32 priorityLevel)
Parameters
observer
IQuickIOTransferObserverObserver for file monitoring by service
priorityLevel
Int32Default priority
Remarks
Thread-safe
QuickIOTransferJob(Int32 priorityLevel)
Creates a new instance of QuickIOTransferJob
protected void QuickIOTransferJob(Int32 priorityLevel)
Parameters
priorityLevel
Int32Default priority
Remarks
Thread-safe
Implementation()
Implementation. It is executed by default without a background thread. The method can block.
protected abstract void Implementation()
OnEnd(DateTime started, DateTime finished)
Fires RunRaised
protected virtual void OnEnd(DateTime started, DateTime finished)
OnError(Exception e)
Fires Error
protected virtual void OnError(Exception e)
OnRun(DateTime started)
Fires RunRaised
protected virtual void OnRun(DateTime started)
Run()
Executes Implementation
public void Run()
Example
Contains following content
public void Run( )
{
var started = DateTime.Now;
OnRun( started );
try
{
Implementation( );
}
catch ( Exception e )
{
OnError( e );
throw;
}
OnEnd( started, DateTime.Now );
}
RunAsync()
Executes Run in Async context
public Task RunAsync()
CurrentRetryCount
Retry count before firing broken exception
public Int32 CurrentRetryCount { get; set; }
Remarks
Thread-safe
JobType
JobType
internal abstract QuickIOTransferJobType JobType { get; }
Observer
Central observer
public IQuickIOTransferObserver Observer { get; set; }
PriorityLevel
Prority level. Higher priority = higher value. 0 = default
public Int32 PriorityLevel { get; set; }
Remarks
Thread-safe