Interface IAsyncJobQueue
A queue for long-existing System.Collections.Generic.IAsyncEnumerable<T> that represent a collection of long running resumable jobs.
Namespace: Snowflake.Extensibility.Queueing
Assembly: Snowflake.Framework.Primitives.dll
Syntax
public interface IAsyncJobQueue
Methods
GetActiveJobs()
Retrieves the Job IDs for jobs active in the job queue, meaning that they have active enumerators being evaluated in the queue.
This does not include undisposed, but inactive jobs.
Declaration
IEnumerable<Guid> GetActiveJobs()
Returns
Type | Description |
---|---|
System. |
The job IDs for jobs active in the job queue. |
GetQueuedJobs()
Retrieves the Job IDs for all jobs in the queue, regardless of their state, including undisposed, but inactive jobs.
Declaration
IEnumerable<Guid> GetQueuedJobs()
Returns
Type | Description |
---|---|
System. |
Gets jobs currently stored in the job queue |
GetZombieJobs()
Retrieves the job IDs for all jobs that are undisposed, but no longer have items in the enumerator.
Declaration
IEnumerable<Guid> GetZombieJobs()
Returns
Type | Description |
---|---|
System. |
he job IDs for jobs that are undisposed, but no longer have items left in their enumerator. |
HasJob(Guid)
Checks whether or not a job source with the given GUID exists.
Declaration
bool HasJob(Guid jobId)
Parameters
Type | Name | Description |
---|---|---|
System. |
jobId | The GUID of the job to check |
Returns
Type | Description |
---|---|
System. |
Whether or not the job source still exists, or has already been disposed. |
RequestCancellation(Guid)
Requests cancellation of the specified job. This only works if the IAsyncEnumerable provided supports cancellation.
Declaration
void RequestCancellation(Guid jobId)
Parameters
Type | Name | Description |
---|---|---|
System. |
jobId | The job ID of the job to cancel. |