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()); }
/// <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; }
/// <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; }
/// <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) { }
/// <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()); }
public LazyExecutorServiceDelegate(string id, ExecutorServiceFactory executorServiceFactory) { _id = id; _executorServiceFactory = executorServiceFactory; _executor = new FastLazy <ExecutorService>(() => executorServiceFactory.Produce(_id)); }
public PinnedDispatcher(MessageDispatcherConfigurator configurator, string id, int throughput, long? throughputDeadlineTime, ExecutorServiceFactory executorServiceFactory, TimeSpan shutdownTimeout) : base(configurator, id, throughput, throughputDeadlineTime, executorServiceFactory, shutdownTimeout) { }
public LazyExecutorServiceDelegate(string id, ExecutorServiceFactory executorServiceFactory) { _id = id; _executorServiceFactory = executorServiceFactory; _executor = new FastLazy<ExecutorService>(() => executorServiceFactory.Produce(_id)); }