Exemplo n.º 1
0
 /// <summary>
 /// Request the interruption, within this Scheduler instance, of all
 /// currently executing instances of the identified <see cref="IJob" />.
 /// </summary>
 /// <remarks>
 /// <para>
 /// If more than one instance of the identified job is currently executing,
 /// the cancellation token will be set on each instance.
 /// However, there is a limitation that in the case that
 /// <see cref="Interrupt(JobKey)"/> on one instances throws an exception, all
 /// remaining  instances (that have not yet been interrupted) will not have
 /// their <see cref="Interrupt(JobKey)"/> method called.
 /// </para>
 /// <para>
 /// If you wish to interrupt a specific instance of a job (when more than
 /// one is executing) you can do so by calling
 /// <see cref="GetCurrentlyExecutingJobs"/> to obtain a handle
 /// to the job instance, and then invoke <see cref="Interrupt(JobKey)"/> on it
 /// yourself.
 /// </para>
 /// <para>
 /// This method is not cluster aware.  That is, it will only interrupt
 /// instances of the identified InterruptableJob currently executing in this
 /// Scheduler instance, not across the entire cluster.
 /// </para>
 /// </remarks>
 /// <returns>true is at least one instance of the identified job was found and interrupted.</returns>
 /// <throws>  UnableToInterruptJobException if the job does not implement </throws>
 /// <seealso cref="GetCurrentlyExecutingJobs"/>
 public virtual Task <bool> Interrupt(JobKey jobKey)
 {
     return(sched.Interrupt(jobKey));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Request the interruption, within this Scheduler instance, of all
 /// currently executing instances of the identified <see cref="IJob" />, which
 /// must be an implementor of the <see cref="IInterruptableJob"/> interface.
 /// </summary>
 /// <remarks>
 /// <para>
 /// If more than one instance of the identified job is currently executing,
 /// the <see cref="IInterruptableJob.Interrupt"/> method will be called on
 /// each instance.  However, there is a limitation that in the case that
 /// <see cref="Interrupt(JobKey)"/> on one instances throws an exception, all
 /// remaining  instances (that have not yet been interrupted) will not have
 /// their <see cref="Interrupt(JobKey)"/> method called.
 /// </para>
 /// <para>
 /// If you wish to interrupt a specific instance of a job (when more than
 /// one is executing) you can do so by calling
 /// <see cref="GetCurrentlyExecutingJobs"/> to obtain a handle
 /// to the job instance, and then invoke <see cref="Interrupt(JobKey)"/> on it
 /// yourself.
 /// </para>
 /// <para>
 /// This method is not cluster aware.  That is, it will only interrupt
 /// instances of the identified InterruptableJob currently executing in this
 /// Scheduler instance, not across the entire cluster.
 /// </para>
 /// </remarks>
 /// <returns>true is at least one instance of the identified job was found and interrupted.</returns>
 /// <throws>  UnableToInterruptJobException if the job does not implement </throws>
 /// <seealso cref="IInterruptableJob"/>
 /// <seealso cref="GetCurrentlyExecutingJobs"/>
 public virtual bool Interrupt(JobKey jobKey)
 {
     return(sched.Interrupt(jobKey));
 }
Exemplo n.º 3
0
 /// <summary>
 /// Request the interruption, within this Scheduler instance, of all
 /// currently executing instances of the identified <see cref="IJob" />, which
 /// must be an implementor of the <see cref="IInterruptableJob"/> interface.
 /// </summary>
 /// <remarks>
 /// <p>
 /// If more than one instance of the identified job is currently executing,
 /// the <see cref="IInterruptableJob.Interrupt"/> method will be called on
 /// each instance.  However, there is a limitation that in the case that
 /// <see cref="Interrupt"/> on one instances throws an exception, all
 /// remaining  instances (that have not yet been interrupted) will not have
 /// their <see cref="Interrupt"/> method called.
 /// </p>
 /// <p>
 /// If you wish to interrupt a specific instance of a job (when more than
 /// one is executing) you can do so by calling
 /// <see cref="GetCurrentlyExecutingJobs"/> to obtain a handle
 /// to the job instance, and then invoke <see cref="Interrupt"/> on it
 /// yourself.
 /// </p>
 /// <p>
 /// This method is not cluster aware.  That is, it will only interrupt
 /// instances of the identified InterruptableJob currently executing in this
 /// Scheduler instance, not across the entire cluster.
 /// </p>
 /// </remarks>
 /// <param name="jobName"></param>
 /// <param name="groupName"></param>
 /// <returns>true is at least one instance of the identified job was found and interrupted.</returns>
 /// <throws>  UnableToInterruptJobException if the job does not implement </throws>
 /// <seealso cref="IInterruptableJob"/>
 /// <seealso cref="GetCurrentlyExecutingJobs"/>
 public virtual bool Interrupt(string jobName, string groupName)
 {
     return(sched.Interrupt(schedCtxt, jobName, groupName));
 }