/// <inheritdoc /> public void Dispose() { BaseJobStore cachedJobStore = jobStore; if (cachedJobStore != null) { jobStore = null; cachedJobStore.SignalBlockedThreads(); } }
/// <inheritdoc /> public JobDetails GetNextJobToProcess() { for (;;) { BaseJobStore cachedJobStore = jobStore; if (cachedJobStore == null) { return(null); } JobDetails jobDetails = jobStore.GetNextJobToProcessOrWaitUntilSignaled(schedulerGuid); if (jobDetails != null) { return(jobDetails); } } }
/// <summary> /// Creates a job watcher for the specified job store and scheduler. /// </summary> /// <param name="jobStore">The job store to which to delegate the watching operations</param> /// <param name="schedulerGuid">The scheduler GUID</param> public JobWatcher(BaseJobStore jobStore, Guid schedulerGuid) { this.jobStore = jobStore; this.schedulerGuid = schedulerGuid; }