コード例 #1
0
        /// <summary>Wait for the NodeManger to go for the disk-health-check at least once.</summary>
        private void WaitForDiskHealthCheck()
        {
            long lastDisksCheckTime = dirsHandler.GetLastDisksCheckTime();
            long time = lastDisksCheckTime;

            for (int i = 0; i < 10 && (time <= lastDisksCheckTime); i++)
            {
                try
                {
                    Sharpen.Thread.Sleep(1000);
                }
                catch (Exception)
                {
                    Log.Error("Interrupted while waiting for NodeManager's disk health check.");
                }
                time = dirsHandler.GetLastDisksCheckTime();
            }
        }