internal PersistentCommandDispatcher(TreeQueue queue, TreeQueueThreadPool threadPool, ICommandDistributor distributor, ICommandPublishingStore store, ISerializer formatter, ISchedulingProvider schedulingProvider)
 {
     this.queue              = queue;
     this.threadPool         = threadPool;
     this.distributor        = distributor;
     this.store              = store;
     this.formatter          = formatter;
     this.schedulingProvider = schedulingProvider;
     Initialize();
 }
        private void EnsureInternals()
        {
            if (queue == null)
            {
                queue = new TreeQueue();
            }

            if (threadPool == null)
            {
                threadPool = new TreeQueueThreadPool(queue);
            }
        }
 /// <summary>
 /// Creates new instance.
 /// </summary>
 /// <param name="distributor">The command-to-the-queue distributor.</param>
 /// <param name="store">The publishing store for command persistent delivery.</param>
 /// <param name="formatter">The formatter for serializing commands.</param>
 /// <param name="schedulingProvider">The provider of a delay computation for delayed commands.</param>
 public PersistentCommandDispatcher(ICommandDistributor distributor, ICommandPublishingStore store, ISerializer formatter, ISchedulingProvider schedulingProvider)
 {
     Ensure.NotNull(distributor, "distributor");
     Ensure.NotNull(store, "store");
     Ensure.NotNull(formatter, "formatter");
     Ensure.NotNull(schedulingProvider, "schedulingProvider");
     this.distributor        = distributor;
     this.store              = store;
     this.formatter          = formatter;
     this.threadPool         = new TreeQueueThreadPool(queue);
     this.schedulingProvider = schedulingProvider;
     Initialize();
 }
Ejemplo n.º 4
0
        private void EnsureInternals()
        {
            if (queue == null)
            {
                queue = new TreeQueue();
            }

            if (threadPool == null)
            {
                threadPool = new TreeQueueThreadPool(queue);
            }

            if (logFactory == null)
            {
                logFactory = new DefaultLogFactory();
            }
        }