Example #1
0
        public void SetUpQueue()
        {
            options  = new TestServiceBusQueueOptions();
            provider = new ServiceBusQueueJobQueueProvider(options);

            queue   = provider.GetJobQueue();
            monitor = provider.GetJobQueueMonitoringApi();
        }
        public SqlServerJobQueueProvider([NotNull] SqlServerStorage storage, [NotNull] SqlServerStorageOptions options)
        {
            if (storage == null) throw new ArgumentNullException("storage");
            if (options == null) throw new ArgumentNullException("options");

            _jobQueue = new SqlServerJobQueue(storage, options);
            _monitoringApi = new SqlServerJobQueueMonitoringApi(storage);
        }
        public RavenJobQueueProvider([NotNull] RavenStorage storage, [NotNull] RavenStorageOptions options)
        {
            storage.ThrowIfNull("storage");
            options.ThrowIfNull("options");

            _jobQueue = new RavenJobQueue(storage, options);
            _monitoringApi = new RavenJobQueueMonitoringApi(storage);
        }
        public MySqlJobQueueProvider(MySqlStorage storage, MySqlStorageOptions options)
        {
            if (storage == null) throw new ArgumentNullException("storage");
            if (options == null) throw new ArgumentNullException("options");

            _jobQueue = new MySqlJobQueue(storage, options);
            _monitoringApi = new MySqlJobQueueMonitoringApi(storage);
        }
Example #5
0
        public RavenJobQueueProvider([NotNull] RavenStorage storage, [NotNull] RavenStorageOptions options)
        {
            storage.ThrowIfNull("storage");
            options.ThrowIfNull("options");

            _jobQueue      = new RavenJobQueue(storage, options);
            _monitoringApi = new RavenJobQueueMonitoringApi(storage);
        }
 public FluentNHibernateJobQueueProvider(FluentNHibernateJobStorage storage)
 {
     if (storage == null)
     {
         throw new ArgumentNullException(nameof(storage));
     }
     _jobQueue      = new FluentNHibernateJobQueue(storage);
     _monitoringApi = new FluentNHibernateJobQueueMonitoringApi(storage);
 }
Example #7
0
    public void GetJobQueueMonitoringApi_WhenIsNotNull()
    {
        // arrange
        JobQueueProvider provider = new(Storage);

        // act
        IPersistentJobQueueMonitoringApi queue = provider.GetJobQueueMonitoringApi();

        // assert
        Assert.NotNull(queue);
    }
        public long EnqueuedCount(string queue)
        {
            if (string.IsNullOrEmpty(queue))
            {
                throw new ArgumentNullException(nameof(queue));
            }

            IPersistentJobQueueProvider      provider      = storage.QueueProviders.GetProvider(queue);
            IPersistentJobQueueMonitoringApi monitoringApi = provider.GetJobQueueMonitoringApi();

            return(monitoringApi.GetEnqueuedCount(queue));
        }
        private void SetUpQueue(TimeSpan lockDuration)
        {
            options = new TestServiceBusQueueOptions
            {
                Configure = d => d.LockDuration = lockDuration
            };

            provider = new ServiceBusQueueJobQueueProvider(options);

            queue   = provider.GetJobQueue();
            monitor = provider.GetJobQueueMonitoringApi();
        }
        public MySqlJobQueueProvider(MySqlStorage storage, MySqlStorageOptions options)
        {
            if (storage == null)
            {
                throw new ArgumentNullException("storage");
            }
            if (options == null)
            {
                throw new ArgumentNullException("options");
            }

            _jobQueue      = new MySqlJobQueue(storage, options);
            _monitoringApi = new MySqlJobQueueMonitoringApi(storage, options);
        }
        public SqlServerJobQueueProvider([NotNull] SqlServerStorage storage, [NotNull] SqlServerStorageOptions options)
        {
            if (storage == null)
            {
                throw new ArgumentNullException("storage");
            }
            if (options == null)
            {
                throw new ArgumentNullException("options");
            }

            _jobQueue      = new SqlServerJobQueue(storage, options);
            _monitoringApi = new SqlServerJobQueueMonitoringApi(storage);
        }
        public OracleJobQueueProvider(OracleStorage storage, OracleStorageOptions options)
        {
            if (storage == null)
            {
                throw new ArgumentNullException("storage");
            }
            if (options == null)
            {
                throw new ArgumentNullException("options");
            }

            _jobQueue      = new OracleJobQueue(storage, options);
            _monitoringApi = new OracleJobQueueMonitoringApi(storage);
        }
        public SQLiteJobQueueProvider([NotNull] SQLiteStorage storage, [NotNull] SQLiteStorageOptions options)
        {
            if (storage == null)
            {
                throw new ArgumentNullException(nameof(storage));
            }
            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            _jobQueue      = new SQLiteJobQueue(storage, options);
            _monitoringApi = new SQLiteJobQueueMonitoringApi(storage);
        }
Example #14
0
        public FluentNHibernateJobQueueProvider(FluentNHibernateJobStorage storage,
                                                FluentNHibernateStorageOptions options)
        {
            if (storage == null)
            {
                throw new ArgumentNullException("storage");
            }
            if (options == null)
            {
                throw new ArgumentNullException("options");
            }

            _jobQueue      = new FluentNHibernateJobQueue(storage, options);
            _monitoringApi = new FluentNHibernateJobQueueMonitoringApi(storage);
        }