/// <summary> /// Execute the operation against GSM in the current transaction scope. /// </summary> /// <param name="ts">Transaction scope.</param> /// <returns> /// Results of the operation. /// </returns> public override IStoreResults DoGlobalExecute(IStoreTransactionScope ts) { _loadResults.Clear(); IStoreResults result = ts.ExecuteOperation( StoreOperationRequestBuilder.SpGetAllShardMapsGlobal, StoreOperationRequestBuilder.GetAllShardMapsGlobal()); if (result.Result == StoreResult.Success) { foreach (IStoreShardMap ssm in result.StoreShardMaps) { _ssmCurrent = ssm; result = ts.ExecuteOperation( StoreOperationRequestBuilder.SpGetAllShardMappingsGlobal, StoreOperationRequestBuilder.GetAllShardMappingsGlobal(ssm, null, null)); if (result.Result == StoreResult.Success) { _loadResults.Add( new LoadResult { ShardMap = ssm, Mappings = result.StoreMappings }); } else if (result.Result != StoreResult.ShardMapDoesNotExist) { // Ignore some possible failures for Load operation and skip failed // shard map caching operations. break; } } } return(result); }
/// <summary> /// Execute the operation against GSM in the current transaction scope. /// </summary> /// <param name="ts">Transaction scope.</param> /// <returns> /// Results of the operation. /// </returns> public override IStoreResults DoGlobalExecute(IStoreTransactionScope ts) { return(ts.ExecuteOperation( StoreOperationRequestBuilder.SpGetAllShardMapsGlobal, StoreOperationRequestBuilder.GetAllShardMapsGlobal())); }