public virtual void Handle(SystemMessage.StateChangeMessage message)
        {
            _vnodeState = message.State;

            switch (message.State)
            {
            case VNodeState.Master: {
                _indexWriter.Reset();
                EpochManager.WriteNewEpoch();                                 // forces flush
                break;
            }

            case VNodeState.ShuttingDown: {
                Writer.Close();
                break;
            }
            }
        }
        public virtual void Handle(SystemMessage.StateChangeMessage message)
        {
            _vnodeState = message.State;

            switch (message.State)
            {
            case VNodeState.Leader: {
                _indexWriter.Reset();
                EpochManager.WriteNewEpoch(((SystemMessage.BecomeLeader)message).EpochNumber);
                break;
            }

            case VNodeState.ShuttingDown: {
                Writer.Close();
                break;
            }
            }
        }