Class HystrixQueuedTaskScheduler
- Namespace
- Steeltoe.CircuitBreaker.Hystrix.Strategy.Concurrency
- Assembly
- Steeltoe.CircuitBreaker.HystrixBase.dll
[Obsolete("This feature will be removed in the next major version. See https://steeltoe.io/docs/v3/obsolete for details.")]
public class HystrixQueuedTaskScheduler : HystrixTaskScheduler, IHystrixTaskScheduler, IDisposable
- Inheritance
-
HystrixQueuedTaskScheduler
- Implements
- Inherited Members
Constructors
HystrixQueuedTaskScheduler(IHystrixThreadPoolOptions)
public HystrixQueuedTaskScheduler(IHystrixThreadPoolOptions options)
Parameters
optionsIHystrixThreadPoolOptions
Fields
workQueue
protected BlockingCollection<Task> workQueue
Field Value
Properties
CurrentQueueSize
public override int CurrentQueueSize { get; }
Property Value
IsQueueSpaceAvailable
public override bool IsQueueSpaceAvailable { get; }
Property Value
Methods
GetScheduledTasks()
For debugger support only, generates an enumerable of Task instances currently queued to the scheduler waiting to be executed.
protected override IEnumerable<Task> GetScheduledTasks()
Returns
- IEnumerable<Task>
An enumerable that allows a debugger to traverse the tasks currently queued to this scheduler.
Exceptions
- NotSupportedException
This scheduler is unable to generate a list of queued tasks at this time.
QueueTask(Task)
Queues a Task to the scheduler.
protected override void QueueTask(Task task)
Parameters
Exceptions
- ArgumentNullException
The
taskargument is null.
StartThreadPoolWorker()
protected void StartThreadPoolWorker()
TryExecuteTaskInline(Task, bool)
Determines whether the provided Task can be executed synchronously in this call, and if it can, executes it.
protected override bool TryExecuteTaskInline(Task task, bool prevQueued)
Parameters
Returns
- bool
A Boolean value indicating whether the task was executed inline.
Exceptions
- ArgumentNullException
The
taskargument is null.- InvalidOperationException
The
taskwas already executed.