コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RemoveMessageDecorator"/> class.
 /// </summary>
 /// <param name="handler">The handler.</param>
 /// <param name="tracer">The tracer.</param>
 /// <param name="headers">The headers.</param>
 /// <param name="getHeader">The get header.</param>
 public RemoveMessageDecorator(IRemoveMessage handler, ITracer tracer, IStandardHeaders headers, IGetHeader getHeader)
 {
     _handler   = handler;
     _tracer    = tracer;
     _headers   = headers;
     _getHeader = getHeader;
 }
コード例 #2
0
 /// <summary>Initializes a new instance of the <see cref="SqliteSendToJobQueue"/> class.</summary>
 /// <param name="queue">The queue.</param>
 /// <param name="doesJobExist">Query for determining if a job already exists</param>
 /// <param name="removeMessage">The remove message.</param>
 /// <param name="getJobId">The get job identifier.</param>
 /// <param name="createJobMetaData">The create job meta data.</param>
 /// <param name="getTimeFactory">The get time factory.</param>
 public SqliteSendToJobQueue(IProducerMethodQueue queue, IQueryHandler <DoesJobExistQuery <IDbConnection, IDbTransaction>, QueueStatuses> doesJobExist,
                             IRemoveMessage removeMessage,
                             IQueryHandler <GetJobIdQuery, long> getJobId, CreateJobMetaData createJobMetaData,
                             IGetTimeFactory getTimeFactory) : base(queue, getTimeFactory)
 {
     _doesJobExist      = doesJobExist;
     _removeMessage     = removeMessage;
     _getJobId          = getJobId;
     _createJobMetaData = createJobMetaData;
 }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LiteDbSendJobToQueue"/> class.
 /// </summary>
 /// <param name="connectionInformation">The connection information.</param>
 /// <param name="queue">The queue.</param>
 /// <param name="doesJobExist">The does job exist.</param>
 /// <param name="removeMessage">The remove message.</param>
 /// <param name="getJobId">The get job identifier.</param>
 /// <param name="createJobMetaData">The create job meta data.</param>
 /// <param name="getTimeFactory">The get time factory.</param>
 public LiteDbSendJobToQueue(LiteDbConnectionManager connectionInformation, IProducerMethodQueue queue, IQueryHandler <DoesJobExistQuery, QueueStatuses> doesJobExist,
                             IRemoveMessage removeMessage,
                             IQueryHandler <GetJobIdQuery <int>, int> getJobId, CreateJobMetaData createJobMetaData,
                             IGetTimeFactory getTimeFactory) : base(queue, getTimeFactory)
 {
     _doesJobExist          = doesJobExist;
     _removeMessage         = removeMessage;
     _getJobId              = getJobId;
     _createJobMetaData     = createJobMetaData;
     _connectionInformation = connectionInformation;
 }
コード例 #4
0
 /// <summary>Initializes a new instance of the <see cref="RedisSendJobToQueue"/> class.</summary>
 /// <param name="queue">The queue.</param>
 /// <param name="doesJobExist">Query for determining if a job already exists</param>
 /// <param name="removeMessage">removes a message</param>
 /// <param name="getJobId">The get job identifier.</param>
 /// <param name="getTimeFactory">The get time factory.</param>
 /// <param name="jobSchedulerMetaData">The job scheduler meta data.</param>
 public RedisSendJobToQueue(IProducerMethodQueue queue, IQueryHandler <DoesJobExistQuery, QueueStatuses> doesJobExist,
                            IRemoveMessage removeMessage,
                            IQueryHandler <GetJobIdQuery, string> getJobId,
                            IGetTimeFactory getTimeFactory,
                            IJobSchedulerMetaData jobSchedulerMetaData) : base(queue, getTimeFactory)
 {
     _doesJobExist         = doesJobExist;
     _removeMessage        = removeMessage;
     _getJobId             = getJobId;
     _jobSchedulerMetaData = jobSchedulerMetaData;
 }
コード例 #5
0
 /// <summary>Initializes a new instance of the <see cref="PostgreSqlSendJobToQueue"/> class.</summary>
 /// <param name="queue">The queue.</param>
 /// <param name="doesJobExist">Query for determining if a job already exists</param>
 /// <param name="getJobId">The get job identifier.</param>
 /// <param name="createJobMetaData">The create job meta data.</param>
 /// <param name="getTimeFactory">The get time factory.</param>
 /// <param name="removeMessage"></param>
 /// <inheritdoc />
 public PostgreSqlSendJobToQueue(IProducerMethodQueue queue, IQueryHandler <DoesJobExistQuery <NpgsqlConnection, NpgsqlTransaction>, QueueStatuses> doesJobExist,
                                 IQueryHandler <GetJobIdQuery, long> getJobId,
                                 CreateJobMetaData createJobMetaData,
                                 IGetTimeFactory getTimeFactory,
                                 IRemoveMessage removeMessage) : base(queue, getTimeFactory)
 {
     _doesJobExist      = doesJobExist;
     _getJobId          = getJobId;
     _createJobMetaData = createJobMetaData;
     _removeMessage     = removeMessage;
 }
コード例 #6
0
        /// <summary>Initializes a new instance of the <see cref="ClearExpiredMessages"/> class.</summary>
        /// <param name="connectionInfo">The connection information.</param>
        /// <param name="findErrorMessagesQueryHandler">The find error messages query handler.</param>
        /// <param name="removeMessage"></param>
        public ClearErrorMessages(IConnectionInformation connectionInfo,
                                  IQueryHandler <FindErrorMessagesToDeleteQuery, IEnumerable <long> > findErrorMessagesQueryHandler,
                                  IRemoveMessage removeMessage)
        {
            Guard.NotNull(() => connectionInfo, connectionInfo);
            Guard.NotNull(() => findErrorMessagesQueryHandler, findErrorMessagesQueryHandler);
            Guard.NotNull(() => removeMessage, removeMessage);

            _connectionInfo = connectionInfo;
            _findErrorMessagesQueryHandler = findErrorMessagesQueryHandler;
            _removeMessage = removeMessage;
        }
コード例 #7
0
        /// <summary>Initializes a new instance of the <see cref="ReceiveMessageQueryHandler"/> class.</summary>
        /// <param name="serializer">The serializer.</param>
        /// <param name="receivedMessageFactory">The received message factory.</param>
        /// <param name="removeMessage">Removes a message from the queue</param>
        /// <param name="redisHeaders">The redisHeaders.</param>
        /// <param name="dequeueLua">The dequeue.</param>
        /// <param name="unixTimeFactory">The unix time factory.</param>
        /// <param name="messageFactory">The message factory.</param>
        public ReceiveMessageQueryHandler(
            ICompositeSerialization serializer,
            IReceivedMessageFactory receivedMessageFactory,
            IRemoveMessage removeMessage,
            RedisHeaders redisHeaders,
            DequeueLua dequeueLua,
            IUnixTimeFactory unixTimeFactory,
            IMessageFactory messageFactory)
        {
            Guard.NotNull(() => serializer, serializer);
            Guard.NotNull(() => receivedMessageFactory, receivedMessageFactory);
            Guard.NotNull(() => removeMessage, removeMessage);
            Guard.NotNull(() => redisHeaders, redisHeaders);
            Guard.NotNull(() => dequeueLua, dequeueLua);
            Guard.NotNull(() => unixTimeFactory, unixTimeFactory);

            _serializer             = serializer;
            _receivedMessageFactory = receivedMessageFactory;
            _removeMessage          = removeMessage;
            _redisHeaders           = redisHeaders;
            _dequeueLua             = dequeueLua;
            _unixTimeFactory        = unixTimeFactory;
            _messageFactory         = messageFactory;
        }
コード例 #8
0
 /// <summary>Initializes a new instance of the <see cref="CommitMessage"/> class.</summary>
 /// <param name="removeMessage">The remove message.</param>
 public CommitMessage(IRemoveMessage removeMessage)
 {
     Guard.NotNull(() => removeMessage, removeMessage);
     _removeMessage = removeMessage;
 }