public CurrentSynchronizationContextDispatcher(MessageDispatcherConfigurator configurator, string id, int throughput, long? throughputDeadlineTime, ExecutorServiceFactory executorServiceFactory, TimeSpan shutdownTimeout) 
     : base(configurator, id, throughput, throughputDeadlineTime, executorServiceFactory, shutdownTimeout)
 {
     /*
      * Critical: in order for the CurrentSynchronizationContextExecutor to function properly, it can't be lazily 
      * initialized like all of the others. It has to be executed right away.
      */
     ExecuteTask(new NoTask());
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Used to create a default <see cref="Dispatcher"/>
 /// </summary>
 /// <param name="configurator">The configurator used.</param>
 /// <param name="id">The id of this dispatcher.</param>
 /// <param name="throughput">The throughput of this dispatcher.</param>
 /// <param name="throughputDeadlineTime">The deadline for completing N (where N = throughput) operations on the mailbox..</param>
 /// <param name="executorServiceFactory">The factory for producing the executor who will do the work.</param>
 /// <param name="shutdownTimeout">The graceful stop timeout period.</param>
 public Dispatcher(MessageDispatcherConfigurator configurator, string id, int throughput, long?throughputDeadlineTime,
                   ExecutorServiceFactory executorServiceFactory, TimeSpan shutdownTimeout) : base(configurator)
 {
     _executorService = new LazyExecutorServiceDelegate(id, executorServiceFactory);
     Id                     = id;
     Throughput             = throughput;
     ThroughputDeadlineTime = throughputDeadlineTime;
     ShutdownTimeout        = shutdownTimeout;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Used to create a default <see cref="Dispatcher"/>
 /// </summary>
 /// <param name="configurator">The configurator used.</param>
 /// <param name="id">The id of this dispatcher.</param>
 /// <param name="throughput">The throughput of this dispatcher.</param>
 /// <param name="throughputDeadlineTime">The deadline for completing N (where N = throughput) operations on the mailbox..</param>
 /// <param name="executorServiceFactory">The factory for producing the executor who will do the work.</param>
 /// <param name="shutdownTimeout">The graceful stop timeout period.</param>
 public Dispatcher(MessageDispatcherConfigurator configurator, string id, int throughput, long? throughputDeadlineTime,
     ExecutorServiceFactory executorServiceFactory, TimeSpan shutdownTimeout) : base(configurator)
 {
     _executorService = new LazyExecutorServiceDelegate(id, executorServiceFactory);
     Id = id;
     Throughput = throughput;
     ThroughputDeadlineTime = throughputDeadlineTime;
     ShutdownTimeout = shutdownTimeout;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// TBD
 /// </summary>
 /// <param name="configurator">TBD</param>
 /// <param name="id">TBD</param>
 /// <param name="throughput">TBD</param>
 /// <param name="throughputDeadlineTime">TBD</param>
 /// <param name="executorServiceFactory">TBD</param>
 /// <param name="shutdownTimeout">TBD</param>
 public PinnedDispatcher(MessageDispatcherConfigurator configurator,
                         string id, int throughput, long?throughputDeadlineTime,
                         ExecutorServiceFactory executorServiceFactory,
                         TimeSpan shutdownTimeout) : base(configurator, id, throughput, throughputDeadlineTime, executorServiceFactory, shutdownTimeout)
 {
 }
Ejemplo n.º 5
0
 /// <summary>
 /// TBD
 /// </summary>
 /// <param name="configurator">TBD</param>
 /// <param name="id">TBD</param>
 /// <param name="throughput">TBD</param>
 /// <param name="throughputDeadlineTime">TBD</param>
 /// <param name="executorServiceFactory">TBD</param>
 /// <param name="shutdownTimeout">TBD</param>
 public CurrentSynchronizationContextDispatcher(MessageDispatcherConfigurator configurator, string id, int throughput, long?throughputDeadlineTime, ExecutorServiceFactory executorServiceFactory, TimeSpan shutdownTimeout)
     : base(configurator, id, throughput, throughputDeadlineTime, executorServiceFactory, shutdownTimeout)
 {
     /*
      * Critical: in order for the CurrentSynchronizationContextExecutor to function properly, it can't be lazily
      * initialized like all of the others. It has to be executed right away.
      */
     ExecuteTask(new NoTask());
 }
Ejemplo n.º 6
0
 public LazyExecutorServiceDelegate(string id, ExecutorServiceFactory executorServiceFactory)
 {
     _id = id;
     _executorServiceFactory = executorServiceFactory;
     _executor = new FastLazy <ExecutorService>(() => executorServiceFactory.Produce(_id));
 }
Ejemplo n.º 7
0
 public PinnedDispatcher(MessageDispatcherConfigurator configurator, 
     string id, int throughput, long? throughputDeadlineTime, 
     ExecutorServiceFactory executorServiceFactory, 
     TimeSpan shutdownTimeout) : base(configurator, id, throughput, throughputDeadlineTime, executorServiceFactory, shutdownTimeout)
 {
 }
Ejemplo n.º 8
0
 public LazyExecutorServiceDelegate(string id, ExecutorServiceFactory executorServiceFactory)
 {
     _id = id;
     _executorServiceFactory = executorServiceFactory;
     _executor = new FastLazy<ExecutorService>(() => executorServiceFactory.Produce(_id));
 }