Class HystrixSyncTaskScheduler
- 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 HystrixSyncTaskScheduler : HystrixTaskScheduler, IHystrixTaskScheduler, IDisposable
- Inheritance
-
HystrixSyncTaskScheduler
- Implements
- Inherited Members
Constructors
HystrixSyncTaskScheduler(IHystrixThreadPoolOptions)
public HystrixSyncTaskScheduler(IHystrixThreadPoolOptions options)
Parameters
optionsIHystrixThreadPoolOptions
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.
SetupWorkQueues(int)
protected void SetupWorkQueues(int size)
Parameters
sizeint
StartThreadPoolWorker()
protected virtual void StartThreadPoolWorker()
StartThreadPoolWorker(ThreadTaskQueue)
protected virtual void StartThreadPoolWorker(HystrixSyncTaskScheduler.ThreadTaskQueue input)
Parameters
TryAddToAny(Task)
protected virtual bool TryAddToAny(Task task)
Parameters
taskTask
Returns
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.