AppTaskBatchProcessor Class

The application task processor handles the batch processing of application tasks as TaskProcessorJob's. The TaskQueueManager object delegates tasks to this task processor via the ProcessTasks(Vault, IEnumerableApplicationTask, CancellationToken)() method. - Registers the task queue passed in via the settings with the TaskQueueManager. - Enables task polling of the TaskQueueManager. - Exposes events [ BatchAdded ] -- BatchAdded => This event receives a TaskProcessorJob a.k.a. a batchJob. --- The individual batch job exposes life-cycle events [ ProcessingStarted, ProcessingCompleted, ProcessingFailed, CancellationRequested, ] --- These events can be used to keep local cached data in sync for --- vault applications or modules that need that sort of live updated info.

Definition

Namespace: MFiles.VAF.MultiserverMode
Assembly: MFiles.VAF (in MFiles.VAF.dll) Version: 24.1.706.1
C#
public class AppTaskBatchProcessor : TaskProcessorBase<AppTaskBatchProcessorSettings>
Inheritance
Object    CancellableOperationApplicationTask    TaskProcessorBaseAppTaskBatchProcessorSettings    AppTaskBatchProcessor

Constructors

AppTaskBatchProcessor Primary constructor.

Properties

CurrentServer Holds the attachment info for this server.
(Inherited from TaskProcessorBaseTSettings)
Data Data value clone container.
(Inherited from CancellableOperationT)
LinkedTokenSource Protected linked cancellation token source. - Used to request cancellation of the process.
(Inherited from CancellableOperationT)
Settings Task processor settings.
(Inherited from TaskProcessorBaseTSettings)
Task The system task that processes this operation.
(Inherited from CancellableOperationT)
Token Linked cancellation token.
(Inherited from CancellableOperationT)

Methods

AggregateActiveBatches Collects an array of the active batches held by this processor.
AggregateActiveTasks Aggregates the tasks from all active batches.
AllowNewTaskRequests This will denote if new tasks can be accepted by the task processor.
(Inherited from TaskProcessorBaseTSettings)
AllowNewTaskRequests(Boolean) This will update the allow new task requests getter method AllowNewTaskRequests. Note that this may or may not actually change the value, since multiple requests may be required to actually toggle the value since it may be used in multiple threads.
(Inherited from TaskProcessorBaseTSettings)
BroadcastVaultExtensionMethodCall(Int32, Vault, ListString) Re-Broadcast the broadcast message so all servers.
(Inherited from TaskProcessorBaseTSettings)
CanAcceptNewTasks Function used to determine if the application task processor can accept any new tasks.
(Overrides TaskProcessorBaseTSettingsCanAcceptNewTasks)
CanCancelTask Determines if the app task can be canceled .
(Inherited from TaskProcessorBaseTSettings)
Cancel Requests cancellation of the operation.
(Inherited from CancellableOperationT)
CancelAfter Requests cancellation of the operation.
(Inherited from CancellableOperationT)
CancelAll Requests immediate cancellation of this and all child tasks.
CancelAll(Int32) Allows canceling with a cancellation delay.
CancelAll(TimeSpan) Allows canceling with a timespan delay.
CanUpdateProgress Determines if the app task can have its progress updated.
(Inherited from TaskProcessorBaseTSettings)
CreateApplicationTaskSafe Helper method used to create a task in the task queue, accounting for the potential that the task queue has been destroyed. - If the task queue is not found, the RegisterTaskQueue() method is called, then the create task is attempted a 2nd time.
(Inherited from TaskProcessorBaseTSettings)
CreateApplicationTaskSafeInTransaction Helper method used to create a task in the task queue, accounting for the potential that the task queue has been destroyed. - If the task queue is not found, the RegisterTaskQueue() method is called, then the create task is attempted a 2nd time.
(Inherited from TaskProcessorBaseTSettings)
GetLatestTaskInfo Resolves the latest task info, by id from the server.
(Inherited from TaskProcessorBaseTSettings)
InjectBuiltInHandlers Injects built in task handlers.
(Inherited from TaskProcessorBaseTSettings)
OnBatchAdded BatchAdded event invoker.
OnBatchCreated BatchCreated event invoker.
OnCancellationRequested Cancellation requested event invocation.
(Inherited from CancellableOperationT)
OnJobCreated Job created event invocation.
(Inherited from TaskProcessorBaseTSettings)
ProcessBatch Assigns the processing of a batch to a system task.
ProcessTasks Task collection processor's implementation of: ProcessTasks(Vault, IEnumerableApplicationTask, CancellationToken).
(Overrides TaskProcessorBaseTSettingsProcessTasks(Vault, IEnumerableApplicationTask, CancellationToken))
RegisterTaskQueues Verifies that the task queue is open. - Opens the queue if it is found to be missing.
(Inherited from TaskProcessorBaseTSettings)
ResetCancellationToken Resets the cancellation token source.
(Inherited from CancellableOperationT)
SendBroadcastMessageSafe Helper method used to send an application task queue broadcast message, accounting for the potential that the task queue has been destroyed. - If the task queue is not found, the RegisterTaskQueue() method is called, then the message creation - is attempted a 2nd time.
(Inherited from TaskProcessorBaseTSettings)
SendBroadcastMessageSafeInTransaction Helper method used to send an application task queue broadcast message, accounting for the potential that the task queue has been destroyed. - If the task queue is not found, the RegisterTaskQueue() method is called, then the message creation - is attempted a 2nd time.
(Inherited from TaskProcessorBaseTSettings)
TaskHandler_VaultExtMethodCaller Generic vault extension method caller.
(Inherited from TaskProcessorBaseTSettings)
ThrowIfCancellationRequested If cancellation has been requested: - The CancellationRequest event is fired. - Then the cancellation exception is thrown.
(Inherited from CancellableOperationT)
ThrowIfNull Asserts the passed object is not null.
(Inherited from CancellableOperationT)
TriggerCancellationRequested Triggers the cancellation requested event, for any registered listeners.
(Inherited from CancellableOperationT)
TriggerPolling Triggers polling right away for the TaskQueueManager.
(Inherited from TaskProcessorBaseTSettings)
TryGetStatusInfo Resolves the status info, when available. - Null otherwise.
(Inherited from TaskProcessorBaseTSettings)
TryGetTraceInfo Resolves the trace info, when available and configured to do so. - Null otherwise.
(Inherited from TaskProcessorBaseTSettings)
UnregisterTaskQueues Detaches the task queue in the settings object for this processor from monitoring by the TaskQueueMonitor.
(Inherited from TaskProcessorBaseTSettings)
UpdateCancelledJobInTaskQueue(ApplicationTask, String, String, Boolean) Updates the passed job as having been cancelled in the task queue.
(Inherited from TaskProcessorBaseTSettings)
UpdateCancelledJobInTaskQueue(TaskProcessorJob, String, String, Boolean) Updates the passed job as having been cancelled in the task queue.
(Inherited from TaskProcessorBaseTSettings)
UpdateCompletedJobInTaskQueue(ApplicationTask, String, String, Boolean) Updates the completed app task in the task queue.
(Inherited from TaskProcessorBaseTSettings)
UpdateCompletedJobInTaskQueue(TaskProcessorJob, String, String, Boolean) Updates the completed app task in the task queue.
(Inherited from TaskProcessorBaseTSettings)
UpdateFailedJobInTaskQueue(ApplicationTask, String, Exception, String, Boolean) Updates the task in the application task queue, with failed info.
(Inherited from TaskProcessorBaseTSettings)
UpdateFailedJobInTaskQueue(TaskProcessorJob, String, Exception, String, Boolean) Updates the task in the application task queue, with failed info.
(Inherited from TaskProcessorBaseTSettings)
UpdateProgressForActiveTasks Forces an update of the task info for tasks with ongoing processing.
UpdateTaskAsAssignedToProcessor Update task info as having been assigned implementation.
(Inherited from TaskProcessorBaseTSettings)
UpdateTaskInfo(ApplicationTask, MFTaskState, String, Boolean) Updates the task info inside the task queue for the passed application task.
(Inherited from TaskProcessorBaseTSettings)
UpdateTaskInfo(TaskProcessorJob, MFTaskState, String, Boolean) Update task info implementation.
(Inherited from TaskProcessorBaseTSettings)
UpdateTasksInProgress Updates the progress in the task queue. - This check is part of the required keep alive updates to the task queue.
(Inherited from TaskProcessorBaseTSettings)
WaitAll Waits indefinitely (or until this cancellation token for this processor has the cancellation requested) for all child tasks to exit.
(Overrides TaskProcessorBaseTSettingsWaitAll)
WaitAll(Int32) Waits for all child tasks to exit.
WaitAll(TimeSpan) Waits for all child tasks to exit.

Events

BatchAdded The Event fired when a new batch is added. - Used to bind to each new batch job, which in turn exposes that individual batch job's life-cycle events.
BatchCreated The Event fired when a new batch is created. - Used to bind to each new batch job, which in turn exposes that individual batch job's life-cycle events.
CancellationRequested Event fired on cancellation requested.
(Inherited from CancellableOperationT)
JobCreated Job created event.
(Inherited from TaskProcessorBaseTSettings)

See Also