Exemplo n.º 1
0
        public void OnStart()
        {
            CountersReader counters = aeron.CountersReader();

            roleCounter = AwaitClusterRoleCounter(counters);
            FindHeartbeatCounter(counters);

            service.OnStart(this);
            isRecovering = true;
            int recoveryCounterId = AwaitRecoveryCounter(counters);

            CheckForSnapshot(counters, recoveryCounterId);
            CheckForReplay(counters, recoveryCounterId);
            isRecovering = false;
            service.OnReady();
        }
Exemplo n.º 2
0
        public void OnStart()
        {
            CountersReader counters = aeron.CountersReader();

            roleCounter      = AwaitClusterRoleCounter(counters);
            heartbeatCounter = AwaitHeartbeatCounter(counters);

            service.OnStart(this);

            isRecovering = true;

            int recoveryCounterId = AwaitRecoveryCounter(counters);

            heartbeatCounter.SetOrdered(epochClock.Time());
            CheckForSnapshot(counters, recoveryCounterId);
            CheckForReplay(counters, recoveryCounterId);

            isRecovering = false;
        }