internal static IExMonitorTransceiver RegisterAndGet(IExecutorService executorService, ExMonitorServerImpl monitorServer) { using (ILogMethod method = Log.LogMethod("", "Method")) { try { if (_instance == null) { lock (_instanceLock) { if (_instance == null) { _instance = new MonitorTransceiver_InMemory(executorService, monitorServer); } } } return _instance; } catch (Exception ex) { method.Exception(ex); } return _instance; } }
internal ExMonitorTransceiverBase(IExecutorService executorService, ExMonitorServerImpl monitorServer) : base(executorService) { _monitorServer = monitorServer; _isMonProcessorStandalone = _monitorServer._isMonProcessorStandalone; // GIM (G2H) _g2hExecutor_GIM = ThreadPoolExecutorFactory.CreateThreadPool <MonMsg_G2H>( new ThreadPoolExecutorArg() { ExecutorService = executorService, KernelModeQueue = false, PoolType = ThreadPoolType.AsyncTaskQueue, ThreadCount = 1, // Configurable FlushItemsBeforeClose = true, ThreadQueueCount = -1, }); _g2hExecutor_GIM.ProcessItem += OnProcessG2HMessageFromWorker; // GIM (H2G) _h2gExecutor_GIM = ThreadPoolExecutorFactory.CreateThreadPool <MonMsg_H2G>( new ThreadPoolExecutorArg() { ExecutorService = executorService, KernelModeQueue = false, PoolType = ThreadPoolType.AsyncTaskQueue, ThreadCount = 1, // Configurable FlushItemsBeforeClose = true, ThreadQueueCount = -1, }); _h2gExecutor_GIM.ProcessItem += OnProcessH2GMessageFromWorker; // Non Priority (G2H) _g2hExecutor_NonPrio = ThreadPoolExecutorFactory.CreateThreadPool <MonMsg_G2H>( new ThreadPoolExecutorArg() { ExecutorService = executorService, KernelModeQueue = false, PoolType = ThreadPoolType.AsyncTaskQueue, ThreadCount = 20, // Configurable FlushItemsBeforeClose = true, ThreadQueueCount = -1, }); _g2hExecutor_NonPrio.ProcessItem += OnProcessG2HMessageFromWorker; // Non Priority (H2G) _h2gExecutor_NonPrio = ThreadPoolExecutorFactory.CreateThreadPool <MonMsg_H2G>( new ThreadPoolExecutorArg() { ExecutorService = executorService, KernelModeQueue = false, PoolType = ThreadPoolType.AsyncTaskQueue, ThreadCount = 5, // Configurable FlushItemsBeforeClose = true, ThreadQueueCount = -1, }); _h2gExecutor_NonPrio.ProcessItem += OnProcessH2GMessageFromWorker; // Priority (G2H) _g2hExecutor_Prio = ThreadPoolExecutorFactory.CreateThreadPool <MonMsg_G2H>( new ThreadPoolExecutorArg() { ExecutorService = executorService, KernelModeQueue = false, PoolType = ThreadPoolType.AsyncTaskQueue, ThreadCount = 20, // Configurable FlushItemsBeforeClose = true, ThreadQueueCount = -1, }); _g2hExecutor_Prio.ProcessItem += OnProcessG2HMessageFromWorker; // Priority (H2G) _h2gExecutor_Prio = ThreadPoolExecutorFactory.CreateThreadPool <MonMsg_H2G>( new ThreadPoolExecutorArg() { ExecutorService = executorService, KernelModeQueue = false, PoolType = ThreadPoolType.AsyncTaskQueue, ThreadCount = 5, // Configurable FlushItemsBeforeClose = true, ThreadQueueCount = -1, }); _h2gExecutor_Prio.ProcessItem += OnProcessH2GMessageFromWorker; }
internal static IExMonitorTransceiver RegisterAndGet(IExecutorService executorService, ExMonitorServerImpl monitorServer) { using (ILogMethod method = Log.LogMethod("", "Method")) { try { if (_instance == null) { lock (_instanceLock) { if (_instance == null) { _instance = new MonitorTransceiver_InMemory(executorService, monitorServer); } } } return(_instance); } catch (Exception ex) { method.Exception(ex); } return(_instance); } }
public MonitorTransceiver_InMemory(IExecutorService executorService, ExMonitorServerImpl monitorServer) : base(executorService, monitorServer) { }
internal ExMonitorTransceiverBase(IExecutorService executorService, ExMonitorServerImpl monitorServer) : base(executorService) { _monitorServer = monitorServer; _isMonProcessorStandalone = _monitorServer._isMonProcessorStandalone; // GIM (G2H) _g2hExecutor_GIM = ThreadPoolExecutorFactory.CreateThreadPool<MonMsg_G2H>( new ThreadPoolExecutorArg() { ExecutorService = executorService, KernelModeQueue = false, PoolType = ThreadPoolType.AsyncTaskQueue, ThreadCount = 1, // Configurable FlushItemsBeforeClose = true, ThreadQueueCount = -1, }); _g2hExecutor_GIM.ProcessItem += OnProcessG2HMessageFromWorker; // GIM (H2G) _h2gExecutor_GIM = ThreadPoolExecutorFactory.CreateThreadPool<MonMsg_H2G>( new ThreadPoolExecutorArg() { ExecutorService = executorService, KernelModeQueue = false, PoolType = ThreadPoolType.AsyncTaskQueue, ThreadCount = 1, // Configurable FlushItemsBeforeClose = true, ThreadQueueCount = -1, }); _h2gExecutor_GIM.ProcessItem += OnProcessH2GMessageFromWorker; // Non Priority (G2H) _g2hExecutor_NonPrio = ThreadPoolExecutorFactory.CreateThreadPool<MonMsg_G2H>( new ThreadPoolExecutorArg() { ExecutorService = executorService, KernelModeQueue = false, PoolType = ThreadPoolType.AsyncTaskQueue, ThreadCount = 20, // Configurable FlushItemsBeforeClose = true, ThreadQueueCount = -1, }); _g2hExecutor_NonPrio.ProcessItem += OnProcessG2HMessageFromWorker; // Non Priority (H2G) _h2gExecutor_NonPrio = ThreadPoolExecutorFactory.CreateThreadPool<MonMsg_H2G>( new ThreadPoolExecutorArg() { ExecutorService = executorService, KernelModeQueue = false, PoolType = ThreadPoolType.AsyncTaskQueue, ThreadCount = 5, // Configurable FlushItemsBeforeClose = true, ThreadQueueCount = -1, }); _h2gExecutor_NonPrio.ProcessItem += OnProcessH2GMessageFromWorker; // Priority (G2H) _g2hExecutor_Prio = ThreadPoolExecutorFactory.CreateThreadPool<MonMsg_G2H>( new ThreadPoolExecutorArg() { ExecutorService = executorService, KernelModeQueue = false, PoolType = ThreadPoolType.AsyncTaskQueue, ThreadCount = 20, // Configurable FlushItemsBeforeClose = true, ThreadQueueCount = -1, }); _g2hExecutor_Prio.ProcessItem += OnProcessG2HMessageFromWorker; // Priority (H2G) _h2gExecutor_Prio = ThreadPoolExecutorFactory.CreateThreadPool<MonMsg_H2G>( new ThreadPoolExecutorArg() { ExecutorService = executorService, KernelModeQueue = false, PoolType = ThreadPoolType.AsyncTaskQueue, ThreadCount = 5, // Configurable FlushItemsBeforeClose = true, ThreadQueueCount = -1, }); _h2gExecutor_Prio.ProcessItem += OnProcessH2GMessageFromWorker; }