private void Handle(SystemMessage.BecomeUnknown message)
        {
            Log.Info("========== [{0}] IS UNKNOWN...", _nodeInfo.InternalHttp);

            _state  = VNodeState.Unknown;
            _master = null;
            _outputBus.Publish(message);
            _mainQueue.Publish(new ElectionMessage.StartElections());
        }
        private void EnqueueMessage(Message message)
        {
            if (message is StorageMessage.IFlushableMessage)
            {
                Interlocked.Increment(ref FlushMessagesInQueue);
            }

            StorageWriterQueue.Publish(message);

            if (message is SystemMessage.BecomeShuttingDown)
            // we need to handle this message on main thread to stop StorageWriterQueue
            {
                StorageWriterQueue.Stop();
                BlockWriter = true;
                Bus.Publish(new SystemMessage.ServiceShutdown("StorageWriter"));
            }
        }
 public void Start()
 {
     _mainQueue.Publish(new SystemMessage.SystemInit());
 }