public TopicFamily(IEventQueueFactory <T> factory) { _channels.OnMissing = topic => { var queue = factory.BuildFor(topic); return(new TopicChannel <T>(queue)); }; }
/// <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> /// 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 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)); }