/// <summary> /// Initializes a new instance of the <see cref="EventQueue"/> class. /// </summary> public EventQueue( IDataGatherer dataGatherer, IRandomCallGenerator generator, uint numberOfStations, uint highwayLength, uint channelsPerStation, uint reservedChannelsPerStation) { if (dataGatherer == null) { throw new ArgumentNullException("dataGatherer"); } if (generator == null) { throw new ArgumentNullException("generator"); } _dataGatherer = dataGatherer; _generator = generator; _stations = new StationList( numberOfStations, highwayLength, channelsPerStation, reservedChannelsPerStation); _innerQueue = new SortedList <uint, IEvent>(); _stationRangeDiameter = highwayLength / numberOfStations; }
/// <summary> /// Initializes a new instance of the <see cref="Replication"/> class. /// </summary> /// <param name="replicationLength">Length of the replication.</param> /// <param name="dataGatherer">The data gatherer.</param> /// <param name="queueFactory">The queue factory.</param> /// <param name="startup">The startup time.</param> public Replication( uint replicationLength, IDataGatherer dataGatherer, IEventQueueFactory queueFactory, uint startup) { _replicationLength = replicationLength; _startup = startup; CurrentState = ReplicationState.NotStarted; ReplicationData = dataGatherer; _queue = queueFactory.Create(dataGatherer); }
public FlowControl(IOptions <AnymateConfig> anymateConfigOptions, ILogger <FlowControl> logger, IDataGatherer dataGatherer) { var anymateConfig = anymateConfigOptions.Value; _anymateService = new AnymateService(anymateConfig.ClientId, anymateConfig.Secret, anymateConfig.Username, anymateConfig.Password); _logger = logger; _dataGatherer = dataGatherer; _processKey = anymateConfig.ProcessKey; }
/// <summary> /// Initializes a new instance of the <see cref="Replication"/> class. /// </summary> /// <param name="replicationLength">Length of the replication.</param> /// <param name="dataGatherer">The data gatherer.</param> /// <param name="queueFactory">The queue factory.</param> /// <param name="startup">The startup time.</param> public Replication( uint replicationLength, IDataGatherer dataGatherer, IEventQueueFactory queueFactory, uint startup ) { _replicationLength = replicationLength; _startup = startup; CurrentState = ReplicationState.NotStarted; ReplicationData = dataGatherer; _queue = queueFactory.Create( dataGatherer ); }
/// <summary> /// Creates the specified gatherer. /// </summary> /// <param name="gatherer">The gatherer.</param> /// <returns></returns> public IEventQueue Create(IDataGatherer gatherer) { return(new EventQueue( gatherer, _generator, _stationCount, _highwayLength, _channels, _reservedChannels)); }
public GatherDataCommandHandler(IDataRepository <Link> linkRepository, IDataRepository <HtmlData> htmlDataRepository, ICommandQueue commandQueue, IDataGatherer dataGatherer, ILogger logger) { _linkRepository = linkRepository; _htmlDataRepository = htmlDataRepository; _commandQueue = commandQueue; _dataGatherer = dataGatherer; _logger = logger; _logger.SetSource(typeof(GatherDataCommand).Name); }
/// <summary> /// Initializes a new instance of the <see cref="EventQueue"/> class. /// </summary> public EventQueue( IDataGatherer dataGatherer, IRandomCallGenerator generator, uint numberOfStations, uint highwayLength, uint channelsPerStation, uint reservedChannelsPerStation ) { if( dataGatherer == null ) throw new ArgumentNullException( "dataGatherer" ); if( generator == null ) throw new ArgumentNullException( "generator" ); _dataGatherer = dataGatherer; _generator = generator; _stations = new StationList( numberOfStations, highwayLength, channelsPerStation, reservedChannelsPerStation ); _innerQueue = new SortedList<uint, IEvent>(); _stationRangeDiameter = highwayLength / numberOfStations; }
/// <summary> /// Creates a replication. /// </summary> /// <param name="gatherer">The data gatherer.</param> /// <param name="queueFactory">The queue factory.</param> /// <returns></returns> public IReplication Create(IDataGatherer gatherer, IEventQueueFactory queueFactory) { return(new Replication(_replicationLength, gatherer, queueFactory, _startup)); }