public virtual void InitializeClient(ClientConfig clientConfig) { _mClientConfig = clientConfig ?? new ClientConfig(); _mHostName = NetworkInterfaceManager.GetLocalHostName(); _mStatistics = new DefaultMessageStatistics(); _mSender = new TcpMessageSender(_mClientConfig, _mStatistics); _mSender.Initialize(); _mFactory = new MessageIdFactory(); _mStatusUpdateTask = new StatusUpdateTask(_mStatistics); // initialize domain and ip address _mFactory.Initialize(_mClientConfig.Domain.Id); // start status update task ThreadPool.QueueUserWorkItem(_mStatusUpdateTask.Run); Logger.Info("Thread(StatusUpdateTask) started."); }
public virtual void InitializeClient(ClientConfig clientConfig) { _clientConfig = clientConfig ?? new ClientConfig(); _hostName = NetworkInterfaceManager.GetLocalHostName(); _statistics = new DefaultMessageStatistics(); _sender = new TcpMessageSender(_clientConfig, _statistics); _sender.Initialize(); _factory = new MessageIdFactory(); _statusUpdateTask = new StatusUpdateTask(_statistics); _taggedTransactions = new ConcurrentDictionary <string, ITaggedTransaction>(); // initialize domain and ip address _factory.Initialize(_clientConfig.Domain.Id); // start status update task ThreadPool.QueueUserWorkItem(_statusUpdateTask.Run); Logger.Info("Thread(StatusUpdateTask) started."); }
public virtual void InitializeClient(ClientConfig clientConfig) { _mClientConfig = clientConfig ?? new ClientConfig(); _mHostName = NetworkInterfaceManager.GetLocalHostName(); _mStatistics = new DefaultMessageStatistics(); _mSender = new TcpMessageSender(_mClientConfig, _mStatistics); _mSender.Initialize(); _mFactory = new MessageIdFactory(); _mStatusUpdateTask = new StatusUpdateTask(_mStatistics); // initialize domain and ip address _mFactory.Initialize(_mClientConfig.Domain.Id); // start status update task ThreadPool.QueueUserWorkItem(_mStatusUpdateTask.Run); Logger.Info("Thread(StatusUpdateTask) started."); }
public virtual void Initialize(AbstractClientConfig clientConfig) { _mClientConfig = clientConfig; _mStatistics = new DefaultMessageStatistics(); _mFactory = new MessageIdFactory(); // initialize domain and ip address _mFactory.Initialize(_mClientConfig.Domain.Id); _mSender = new TcpMessageSender(_mClientConfig, _mStatistics, _mFactory); _mSender.Initialize(); _mStatusUpdateTask = new StatusUpdateTask(_mStatistics, _mClientConfig); _mTaggedTransactions = new LRUCache <string, ITaggedTransaction>(CatConstants.TAGGED_TRANSACTION_CACHE_SIZE); // start status update task ThreadPool.QueueUserWorkItem(_mStatusUpdateTask.Run); Logger.Info("Thread(StatusUpdateTask) started."); }
public virtual void InitializeClient(JasmineSetting clientConfig) { m_ClientConfig = clientConfig ?? new JasmineSetting(); m_HostName = Dns.GetHostName(); m_Statistics = new DefaultMessageStatistics(); m_Sender = new TcpMessageSender(m_ClientConfig, m_Statistics); m_Sender.Initialize(); m_Factory = new MessageIdFactory(); // initialize domain and ip address m_Factory.Initialize(m_ClientConfig.Domain.Id, m_ClientConfig.Domain.Ip); // start status update task if (clientConfig.Domain.Enabled && clientConfig.Domain.HeartBeatEnabled) { _mStatusUpdateTask = new StatusUpdateTask(m_Statistics, clientConfig.Domain); ThreadPool.QueueUserWorkItem(_mStatusUpdateTask.Run); } LoggerManager.Info("Thread(StatusUpdateTask) started."); }
public virtual void InitializeClient(ClientConfig clientConfig) { _clientConfig = clientConfig ?? new ClientConfig(); _hostName = NetworkInterfaceManager.GetLocalHostName(); _statistics = new DefaultMessageStatistics(); _sender = new TcpMessageSender(_clientConfig, _statistics); _sender.Initialize(); _factory = new MessageIdFactory(); _statusUpdateTask = new StatusUpdateTask(_statistics); _taggedTransactions = new ConcurrentDictionary<string, ITaggedTransaction>(); // initialize domain and ip address _factory.Initialize(_clientConfig.Domain.Id); // start status update task ThreadPool.QueueUserWorkItem(_statusUpdateTask.Run); Logger.Info("Thread(StatusUpdateTask) started."); }
public virtual void Initialize(AbstractClientConfig clientConfig) { _mClientConfig = clientConfig; _mStatistics = new DefaultMessageStatistics(); _mFactory = new MessageIdFactory(); // initialize domain and ip address _mFactory.Initialize(_mClientConfig.Domain.Id); _mSender = new TcpMessageSender(_mClientConfig, _mStatistics, _mFactory); _mSender.Initialize(); _mStatusUpdateTask = new StatusUpdateTask(_mStatistics, _mClientConfig); _mTaggedTransactions = new LRUCache<string, ITaggedTransaction>(CatConstants.TAGGED_TRANSACTION_CACHE_SIZE); // start status update task Thread statusUpdateTask = new Thread(_mStatusUpdateTask.Run); statusUpdateTask.IsBackground = true; statusUpdateTask.Start(); Logger.Info("Thread(StatusUpdateTask) started."); }