Esempio n. 1
0
 /**
  * <summary>
  * Thread that checks opened client connections for idle
  * and closes connections that idle for a long time.</summary>
  */
 private void checkIdle()
 {
     while (!closed && U.Sleep(IDLE_CHECK_DELAY))
     {
         try {
             connMgr.closeIdle(cfg.ConnectionIdleTimeout);
         }
         catch (ThreadInterruptedException) {
             break;
         }
     }
 }
Esempio n. 2
0
        /**
         * <summary>
         * Thread that updates topology according to refresh interval specified
         * in configuration.</summary>
         */
        private void updateTopology()
        {
            IGridClientCompute topPrj = new GridClientComputeImpl(this, null, null, topUpdateBalancer);

            while (!closed && U.Sleep(cfg.TopologyRefreshFrequency))
            {
                try {
                    topPrj.RefreshTopology(false, false);
                }
                catch (GridClientException e) {
                    Dbg.WriteLine("Failed to update topology: " + e.Message);
                }
                catch (ThreadInterruptedException) {
                    break;
                }
            }
        }