TaskManager Methods |
The TaskManager type exposes the following members.
Name | Description | |
---|---|---|
![]() | AddTask |
Adds a task to a queue.
|
![]() | AssertLockHeld |
Throws if the current thread isn't holding any type of lock.
(Inherited from Stoppable.) |
![]() | AssertNotShuttingDown |
Throws if the control is already shutting down.
(Inherited from Stoppable.) |
![]() | AssertWriteLockHeld |
Throws if the current thread doesn't hold a write lock.
(Inherited from Stoppable.) |
![]() | BeginShutdownAsync |
Called when shutdown was triggered.
(Overrides StoppableBeginShutdownAsync.) |
![]() | CancelActiveTask |
Attempts to send a cancel signal to an active task.
|
![]() | CancelWaitingTask |
Marks a task as canceled.
Throws if the task is not in the waiting state.
|
![]() | CancelWaitingTasks |
Marks waiting tasks as canceled.
Skips the task if it isn't in the waiting state.
|
![]() | DetachAllQueuesAsync |
Detaches all queues from being processed by the manager.
|
![]() | DetachQueueAsync |
Detaches a queue from being processed by the manager.
|
![]() | Dispose |
Dispose the object.
(Inherited from Stoppable.) |
![]() | Dispose(Boolean) |
Dispose implementation.
(Inherited from Stoppable.) |
![]() | EnterReadLock |
Enter the lock in read mode.
(Inherited from Stoppable.) |
![]() | EnterWriteLock |
Enter the lock in write mode.
(Inherited from Stoppable.) |
![]() | ExitReadLock |
Exit the currently held read lock.
(Inherited from Stoppable.) |
![]() | ExitWriteLock |
Exit the currently held write lock.
(Inherited from Stoppable.) |
![]() | GetActiveTaskIds |
Gets the ids of tasks currently being processed for this manager's queues, on this machine.
|
![]() | GetBroadcastProcessor |
Gets the processor for a specific queue and broadcast type.
Throws if not found.
|
![]() | GetDefaultBroadcastQueueId |
Resolves the id of the default broadcast queue.
|
![]() | GetQueue |
Gets a queue processor.
|
![]() | GetQueueIds |
Gets the ids of all registered queues.
|
![]() | GetQueues |
Gets all registered queue processors.
|
![]() | GetTaskProcessor |
Gets the processor for a specific queue and task type.
Throws if not found.
|
![]() | IsProcessing |
Indicates whether the processing loop is running.
|
![]() | IsQueueRegistered |
Checks if the task manager is currently processing a queue.
|
![]() | IsQueueShuttingDown |
Checks if a queue is shutting down, or was already shutdown.
|
![]() ![]() | IsSupported |
Resolves whether the current environment supports the task queue.
|
![]() | OnShutdownCompleted |
Triggered after all shutdown operations have completed.
(Overrides StoppableOnShutdownCompleted.) |
![]() | Poll |
Triggers a single process cycle.
Only allowed when the the task manager was created with ProcessingInterval
having a value of Zero.
This is primarily used for unit testing or externally driven processing intervals.
This is NOT THREAD SAFE! Care should be taken so this is not called concurrently.
|
![]() | RegisterBroadcastProcessors |
Registers the default broadcast queue with the provided processors.
Opens the queue in the vault, if not done so already.
|
![]() | RegisterQueue |
Registers a queue for the task manager to process.
Opens the queue in the vault, if not done so already.
|
![]() | SendBroadcast(Vault, String, BroadcastDirective) |
Sends a broadcast intended for the default broadcast queue.
|
![]() | SendBroadcast(Vault, String, String, BroadcastDirective) |
Sends a broadcast.
|
![]() | ShutdownAsync |
Starts the shutdown process, if it hasn't already begun.
(Inherited from Stoppable.) |
![]() | StartProcessing |
Starts the processing loop in a background thread.
Fails if ProcessingInterval is set to Zero.
Fails if no queues are registered.
The loop will automatically stop once all queues have been detatched.
|
![]() | TaskCancellationBroadcastHandler |
Default, built-in handler for task cancellation broadcasts.
|