Exemplo n.º 1
0
        private bool CheckForClockTick()
        {
            long nowMs = epochClock.Time();

            if (cachedTimeMs != nowMs)
            {
                cachedTimeMs = nowMs;

                if (_consensusModuleProxy.IsConnected())
                {
                    markFile.UpdateActivityTimestamp(nowMs);
                    heartbeatCounter.SetOrdered(nowMs);
                }
                else
                {
                    ctx.ErrorHandler()(new ClusterException("Consensus Module not connected"));
                    ctx.TerminationHook().Invoke();
                }

                return(true);
            }

            return(false);
        }