Ejemplo n.º 1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public void triggerElection(java.time.Clock clock) throws java.io.IOException
        public virtual void TriggerElection(Clock clock)
        {
            Handle(RaftMessages_ReceivedInstantAwareMessage.of(clock.instant(), new RaftMessages_Timeout_Election(_myself)));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// This should be called after the major recovery operations are complete. Before this is called
        /// this instance cannot become a leader (the timers are disabled) and entries will not be cached
        /// in the in-flight map, because the application process is not running and ready to consume them.
        /// </summary>
        public virtual void PostRecoveryActions()
        {
            lock (this)
            {
                _leaderAvailabilityTimers.start(this.electionTimeout, clock => Handle(RaftMessages_ReceivedInstantAwareMessage.of(clock.instant(), new RaftMessages_Timeout_Heartbeat(_myself))));

                _inFlightCache.enable();
            }
        }