Exemplo n.º 1
0
 public void FlushPool()
 {
     Parallel.Invoke(
         () =>
     {
         if (_repeatUpdatePool != null)
         {
             while (!_repeatUpdatePool.IsFlushed())
             {
                 _repeatUpdatePool.Flush();
                 Thread.Sleep(100);
             }
         }
     },
         () =>
     {
         if (_highPool != null)
         {
             while (!_highPool.IsFlushed())
             {
                 _highPool.Flush();
                 Thread.Sleep(100);
             }
         }
     },
         () =>
     {
         if (_middlePool != null)
         {
             while (!_middlePool.IsFlushed())
             {
                 _middlePool.Flush();
                 Thread.Sleep(100);
             }
         }
     },
         () =>
     {
         if (_normalPool != null)
         {
             while (!_normalPool.IsFlushed())
             {
                 _normalPool.Flush();
                 Thread.Sleep(100);
             }
         }
     },
         () =>
     {
         if (_lowPool != null)
         {
             while (!_lowPool.IsFlushed())
             {
                 _lowPool.Flush();
                 Thread.Sleep(100);
             }
         }
     }
         );
 }
Exemplo n.º 2
0
 //立即批量提交本地缓冲池
 /// <summary>
 /// 立即批量提交本地缓冲池
 /// </summary>
 public static void FlushLogMessage()
 {
     try
     {
         s_logHandlePool.Flush();
         s_logProcessPool.Flush();
         while (true)
         {
             if (s_logHandlePool.IsPoolEmpty)
             {
                 break;
             }
             Thread.Sleep(100);
         }
         while (true)
         {
             if (s_logProcessPool.IsPoolEmpty)
             {
                 break;
             }
             Thread.Sleep(100);
         }
     }
     catch (Exception ex)
     {
         m_localLog.Error(ex);
     }
 }
Exemplo n.º 3
0
 public void FlushPool()
 {
     if (_sendMessagePool != null)
     {
         while (!_sendMessagePool.IsFlushed())
         {
             _sendMessagePool.Flush();
             Thread.Sleep(100);
         }
     }
 }
Exemplo n.º 4
0
 public void FlushMessage()
 {
     m_handlePool.Flush();
     m_processPool.Flush();
     while (true)
     {
         if (m_handlePool.IsFlushed())
         {
             break;
         }
         Thread.Sleep(10);
     }
     while (true)
     {
         if (m_processPool.IsFlushed())
         {
             break;
         }
         Thread.Sleep(10);
     }
 }
Exemplo n.º 5
0
 public void FlushPool()
 {
     Parallel.Invoke(
         () =>
     {
         _pushMessageBus.FlushPool();
     },
         () =>
     {
         if (_saveNotifyPool != null)
         {
             while (!_saveNotifyPool.IsFlushed())
             {
                 _saveNotifyPool.Flush();
                 Thread.Sleep(100);
             }
         }
     },
         () =>
     {
         if (_savePushPool != null)
         {
             while (!_savePushPool.IsFlushed())
             {
                 _savePushPool.Flush();
                 Thread.Sleep(100);
             }
         }
     },
         () =>
     {
         if (_highPool != null)
         {
             while (!_highPool.IsFlushed())
             {
                 _highPool.Flush();
                 Thread.Sleep(100);
             }
         }
     },
         () =>
     {
         if (_middlePool != null)
         {
             while (!_middlePool.IsFlushed())
             {
                 _middlePool.Flush();
                 Thread.Sleep(100);
             }
         }
     },
         () =>
     {
         if (_normalPool != null)
         {
             while (!_normalPool.IsFlushed())
             {
                 _normalPool.Flush();
                 Thread.Sleep(100);
             }
         }
     },
         () =>
     {
         if (_lowPool != null)
         {
             while (!_lowPool.IsFlushed())
             {
                 _lowPool.Flush();
                 Thread.Sleep(100);
             }
         }
     },
         () =>
     {
         if (_repeatSavePool != null)
         {
             while (!_repeatSavePool.IsFlushed())
             {
                 _repeatSavePool.Flush();
                 Thread.Sleep(100);
             }
         }
     }
         );
 }