/// <summary>
        /// initializes or loads existing partition state
        /// </summary>
        /// <param name="partition"></param>
        /// <returns>true - if new partition state was initialized</returns>
        private bool InitOrLoadHandlerState(string partition)
        {
            if (_handlerPartition == partition)
            {
                return(false);
            }

            var newState = _partitionStateCache.GetLockedPartitionState(partition);

            _handlerPartition = partition;
            var initialized = false;

            if (newState != null && !String.IsNullOrEmpty(newState.State))
            {
                _projectionStateHandler.Load(newState.State);
            }
            else
            {
                initialized = true;
                _projectionStateHandler.Initialize();
            }

            //if (!_sharedStateSet && _isBiState)
            if (_isBiState)
            {
                var newSharedState = _partitionStateCache.GetLockedPartitionState("");
                if (newSharedState != null && !String.IsNullOrEmpty(newSharedState.State))
                {
                    _projectionStateHandler.LoadShared(newSharedState.State);
                }
                else
                {
                    _projectionStateHandler.InitializeShared();
                }
            }

            return(initialized);
        }