private void Dispose(bool disposing)
        {
            if (_isDisposed)
            {
                return;
            }

            if (disposing)
            {
                _writer?.Dispose();
                _writer = null;
            }

            _isDisposed = true;
        }
        public bool Connect(ClusterConfiguration configuration)
        {
            if (!IsConnected)
            {
                try
                {
                    _writer?.Dispose();
                    _writer     = new ComCommunicator(configuration);
                    IsConnected = true;
                }
                catch (Exception)
                {
                    IsConnected = false;
                }
            }

            return(IsConnected);
        }