JobShard
class
Namespace: Orleans.DurableJobs
Base implementation of
IJobShard that provides common functionality for job shard implementations. public abstract class JobShard : IJobShard, IAsyncDisposableConstructors
JobShard(string, DateTimeOffset, DateTimeOffset)Initializes a new instance of theJobShardclass.
Properties
EndTimeGets the end time of the time range managed by this shard.IdGets the unique identifier for this job shard.IsAddingCompletedGets a value indicating whether this shard has been marked as complete and is no longer accepting new jobs.MetadataGets optional metadata associated with this job shard.StartTimeGets the start time of the time range managed by this shard.
Methods
ConsumeDurableJobsAsyncConsumes durable jobs from this shard in order of their due time.DisposeAsyncPerforms application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.EnqueueJob(DurableJob, int)Enqueues a job into the in-memory queue with the specified dequeue count.GetJobCountAsyncGets the number of jobs currently scheduled in this shard.MarkAsCompleteAsync(CancellationToken)Marks this shard as complete, preventing new jobs from being scheduled.PersistAddJobAsync(DurableJob, CancellationToken)Persists the addition of a new job to the underlying storage.PersistRemoveJobAsync(string, CancellationToken)Persists the removal of a job from the underlying storage.PersistRetryJobAsync(IJobRunContext, DateTimeOffset, CancellationToken)Persists the rescheduling of a job to the underlying storage.RemoveJobAsync(string, CancellationToken)Removes a durable job from this shard.RetryJobLaterAsync(IJobRunContext, DateTimeOffset, CancellationToken)Reschedules a job to be retried at a later time.TryScheduleJobAsync(ScheduleJobRequest, CancellationToken)Attempts to schedule a new job on this shard.
