/// <summary> /// Initializes a new instance of the <see cref="ProducerRecoveryManagerFactory"/> class. /// </summary> /// <param name="recoveryRequestIssuer">The <see cref="IRecoveryRequestIssuer"/> instance needed when creating <see cref="IProducerRecoveryManager"/> instances</param> /// <param name="messageMapper">The <see cref="IFeedMessageMapper"/> instance used to create <see cref="ISessionMessageManager"/> instances</param> /// <param name="config">The <see cref="IOddsFeedConfiguration"/> instance used to create <see cref="IProducerRecoveryManager"/> instances</param> public ProducerRecoveryManagerFactory(IRecoveryRequestIssuer recoveryRequestIssuer, IFeedMessageMapper messageMapper, IOddsFeedConfiguration config) { Guard.Argument(recoveryRequestIssuer, nameof(recoveryRequestIssuer)).NotNull(); Guard.Argument(messageMapper, nameof(messageMapper)).NotNull(); Guard.Argument(config, nameof(config)).NotNull(); _recoveryRequestIssuer = recoveryRequestIssuer; _messageMapper = messageMapper; _config = config; }
/// <summary> /// Initializes a new instance of the <see cref="ProducerRecoveryManagerFactory"/> class. /// </summary> /// <param name="recoveryRequestIssuer">The <see cref="IRecoveryRequestIssuer"/> instance needed when creating <see cref="IProducerRecoveryManager"/> instances</param> /// <param name="messageMapper">The <see cref="IFeedMessageMapper"/> instance used to create <see cref="ISessionMessageManager"/> instances</param> /// <param name="config">The <see cref="IOddsFeedConfiguration"/> instance used to create <see cref="IProducerRecoveryManager"/> instances</param> public ProducerRecoveryManagerFactory(IRecoveryRequestIssuer recoveryRequestIssuer, IFeedMessageMapper messageMapper, IOddsFeedConfiguration config) { Contract.Requires(recoveryRequestIssuer != null); Contract.Requires(messageMapper != null); Contract.Requires(config != null); _recoveryRequestIssuer = recoveryRequestIssuer; _messageMapper = messageMapper; _config = config; }
public RecoveryOperation(Producer producer, IRecoveryRequestIssuer recoveryRequestIssuer, IEnumerable <MessageInterest> allInterests, int nodeId, bool adjustAfterAge) { Guard.Argument(producer, nameof(producer)).NotNull(); Guard.Argument(recoveryRequestIssuer, nameof(recoveryRequestIssuer)).NotNull(); Guard.Argument(allInterests, nameof(allInterests)).NotNull().NotEmpty(); _producer = producer; _recoveryRequestIssuer = recoveryRequestIssuer; _allInterests = allInterests as List <MessageInterest> ?? new List <MessageInterest>(allInterests); _nodeId = nodeId; _adjustedAfterAge = adjustAfterAge; }
public RecoveryOperation(Producer producer, IRecoveryRequestIssuer recoveryRequestIssuer, IEnumerable <MessageInterest> allInterests, int nodeId, bool adjustAfterAge) { Contract.Requires(producer != null); Contract.Requires(recoveryRequestIssuer != null); Contract.Requires(allInterests != null && allInterests.Any()); _producer = producer; _recoveryRequestIssuer = recoveryRequestIssuer; _allInterests = allInterests as List <MessageInterest> ?? new List <MessageInterest>(allInterests); _nodeId = nodeId; _adjustedAfterAge = adjustAfterAge; }