Exemplo n.º 1
0
 private void CheckHealthAndUpdateHeartbeat(long nowMs)
 {
     if (null == logAdapter || !logAdapter.Image().Closed)
     {
         heartbeatCounter.SetOrdered(nowMs);
     }
 }
Exemplo n.º 2
0
        public int DoWork()
        {
            int workCount = 0;

            if (CheckForClockTick())
            {
                PollServiceAdapter();
                workCount += 1;
            }

            if (null != logAdapter.Image())
            {
                int polled = logAdapter.Poll(commitPosition.Get());
                if (0 == polled && logAdapter.IsDone())
                {
                    CloseLog();
                }

                workCount += polled;
            }

            return(workCount);
        }