| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using Quadarax.Foundation.Core.Business.Processor.Enums;
- using Quadarax.Foundation.Core.Business.Processor.Providers;
- using Quadarax.Foundation.Core.Business.Processor.Task;
- using Quadarax.Foundation.Core.Logging;
- using Quadarax.Foundation.Core.Object;
- namespace Quadarax.Foundation.Core.Business.Processor.Queue
- {
- public class ProcessQueue : DisposableObject
- {
- #region *** Properties ***
- public bool IsRunning { get; private set; }
- public string QueueIdentifier { get; private set; }
- #endregion
- #region *** Constructors ***
- public ProcessQueue(string processQueueIdentifierToken, IProcessorStorageProvider storage, ProcessQueueConfiguration configuration, CallbackDelegates delegates = null)
- {
- if (string.IsNullOrEmpty(processQueueIdentifierToken)) throw new ArgumentNullException(nameof(processQueueIdentifierToken));
- IdentifierToken = processQueueIdentifierToken;
- _delegates = delegates ?? new CallbackDelegates();
- _log = new QLogger().GetLogger(GetType());
- _configuration = configuration ?? throw new ArgumentNullException(nameof(configuration));
- _storageProvider = storage ?? throw new ArgumentNullException(nameof(storage));
- _configuration.Validate();
- _processingItems = new ProcessQueueItem[_configuration.WorkersCount];
- }
- #endregion
- #region *** Public Operations ***
- public void Start()
- {
- throw new NotImplementedException();
- }
- public void Stop()
- {
- throw new NotImplementedException();
- }
- public ITaskIdentifier CreateTask()
- {
- }
- public ITaskItem GetTask(ITaskIdentifier id)
- {
- }
- public ITaskItem[] GetTask(ITaskIdentifier[] ids)
- {
- }
- public ITaskIdentifier[] QueryTasks(ProcessStatusEnum[] states, bool onlyValid = true, bool includeDeleted = false)
- {
- }
- #endregion
- #region *** Private Operations ***
- protected override void OnDisposing()
- {
- throw new NotImplementedException();
- }
- #endregion
- }
- }
|