Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RedisTaskProcessorRepository"/> class.
 /// </summary>
 /// <param name="provider">The Redis provider to use.</param>
 /// <param name="serializer">The serializer to use.</param>
 public RedisTaskProcessorRepository(IRedisProvider provider, IEntityBinarySerializer serializer)
     : base(new RedisTaskRepository(provider, serializer),
            new RedisTaskRuntimeInfoRepository(provider, serializer),
            new RedisTaskProcessorRuntimeInfoRepository(provider),
            new RedisTaskSummaryRepository(provider, serializer),
            new RedisTaskJobSettingsRepository(provider, serializer),
            new RedisScheduledTaskRepository(provider, serializer))
 {
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="RedisTaskJobSettingsRepository"/> class.
        /// </summary>
        /// <param name="provider">The Redis provider to use.</param>
        /// <param name="serializer">The serializer to use.</param>
        public RedisTaskJobSettingsRepository(IRedisProvider provider, IEntityBinarySerializer serializer)
        {
            Trace.WriteLine("ENTER: Constructing '{0}' ...".FormatInvariant(this.GetType().Name));

            if (provider == null)
            {
                throw new ArgumentNullException(nameof(provider));
            }

            if (serializer == null)
            {
                throw new ArgumentNullException(nameof(serializer));
            }

            this.provider   = provider;
            this.serializer = serializer;

            Trace.WriteLine("EXIT: '{0}' constructed.".FormatInvariant(this.GetType().Name));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="RedisTaskProcessorMessageQueue"/> class.
        /// </summary>
        /// <param name="provider">The Redis provider to use.</param>
        /// <param name="serializer">The serializer to use for master commands serialization.</param>
        public RedisTaskProcessorMessageQueue(IRedisProvider provider, IEntityBinarySerializer serializer)
        {
            Trace.WriteLine("ENTER: Constructing {0} ...".FormatInvariant(this.debugName));

            if (provider == null)
            {
                throw new ArgumentNullException(nameof(provider));
            }

            if (serializer == null)
            {
                throw new ArgumentNullException(nameof(serializer));
            }

            this.provider   = provider;
            this.serializer = serializer;

            this.subscription = provider.CreateSubscription();

            this.subscription.MessageReceived += this.OnMessageReceived;

            Trace.WriteLine("EXIT: {0} constructed.".FormatInvariant(this.debugName));
        }