当前位置: 首页>>代码示例>>C#>>正文


C# IStoreResults类代码示例

本文整理汇总了C#中IStoreResults的典型用法代码示例。如果您正苦于以下问题:C# IStoreResults类的具体用法?C# IStoreResults怎么用?C# IStoreResults使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IStoreResults类属于命名空间,在下文中一共展示了IStoreResults类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DoGlobalUpdateCachePost

        /// <summary>
        /// Refreshes the cache on successful commit of the GSM operation.
        /// </summary>
        /// <param name="result">Operation result.</param>
        public override void DoGlobalUpdateCachePost(IStoreResults result)
        {
            Debug.Assert(result.Result == StoreResult.Success);

            // Add cache entry.
            _shardMapManager.Cache.AddOrUpdateShardMap(_shardMap);
        }
开发者ID:xdansmith,项目名称:elastic-db-tools,代码行数:11,代码来源:AddShardMapGlobalOperation.cs

示例2: DoGlobalUpdateCachePre

 /// <summary>
 /// Invalidates the cache on unsuccessful commit of the GSM operation.
 /// </summary>
 /// <param name="result">Operation result.</param>
 public override void DoGlobalUpdateCachePre(IStoreResults result)
 {
     if (result.Result == StoreResult.ShardMapDoesNotExist)
     {
         // Remove cache entry.
         _shardMapManager.Cache.DeleteShardMap(_shardMap);
     }
 }
开发者ID:CrossPoint,项目名称:elastic-db-tools,代码行数:12,代码来源:RemoveShardMapGlobalOperation.cs

示例3: HandleDoGlobalExecuteError

 /// <summary>
 /// Handles errors from the GSM operation after the LSM operations.
 /// </summary>
 /// <param name="result">Operation result.</param>
 public override void HandleDoGlobalExecuteError(IStoreResults result)
 {
     if (_throwOnFailure)
     {
         throw new ShardManagementException(
             ShardManagementErrorCategory.ShardMapManagerFactory,
             ShardManagementErrorCode.ShardMapManagerStoreDoesNotExist,
             Errors._Store_ShardMapManager_DoesNotExistGlobal);
     }
 }
开发者ID:xdansmith,项目名称:elastic-db-tools,代码行数:14,代码来源:GetShardMapManagerGlobalOperation.cs

示例4: HandleDoGlobalExecuteError

 /// <summary>
 /// Handles errors from the GSM operation after the LSM operations.
 /// </summary>
 /// <param name="result">Operation result.</param>
 public override void HandleDoGlobalExecuteError(IStoreResults result)
 {
     // Possible errors are:
     // StoreResult.StoreVersionMismatch
     // StoreResult.MissingParametersForStoredProcedure
     throw StoreOperationErrorHandler.OnShardMapManagerErrorGlobal(
         result,
         null,
         this.OperationName,
         StoreOperationRequestBuilder.SpFindShardMapByNameGlobal);
 }
开发者ID:CrossPoint,项目名称:elastic-db-tools,代码行数:15,代码来源:FindShardMapByNameGlobalOperation.cs

示例5: HandleDoGlobalExecuteError

 /// <summary>
 /// Handles errors from the GSM operation after the LSM operations.
 /// </summary>
 /// <param name="result">Operation result.</param>
 public override void HandleDoGlobalExecuteError(IStoreResults result)
 {
     // Expected errors are:
     // StoreResult.MissingParametersForStoredProcedure:
     // StoreResult.StoreVersionMismatch:
     throw StoreOperationErrorHandler.OnShardSchemaInfoErrorGlobal(
         result,
         "*",
         this.OperationName,
         StoreOperationRequestBuilder.SpGetAllShardingSchemaInfosGlobal);
 }
开发者ID:CrossPoint,项目名称:elastic-db-tools,代码行数:15,代码来源:GetShardingSchemaInfosGlobalOperation.cs

示例6: HandleDoLocalExecuteError

 /// <summary>
 /// Handles errors from the LSM operation.
 /// </summary>
 /// <param name="result">Operation result.</param>
 public override void HandleDoLocalExecuteError(IStoreResults result)
 {
     // Possible errors are:
     // StoreResult.StoreVersionMismatch
     // StoreResult.MissingParametersForStoredProcedure
     throw StoreOperationErrorHandler.OnRecoveryErrorLocal(
         result,
         null,
         this.Location,
         ShardManagementErrorCategory.Recovery,
         this.OperationName,
         StoreOperationRequestBuilder.SpGetAllShardsLocal);
 }
开发者ID:xdansmith,项目名称:elastic-db-tools,代码行数:17,代码来源:GetShardsLocalOperation.cs

示例7: DoGlobalUpdateCachePre

        /// <summary>
        /// Invalidates the cache on unsuccessful commit of the GSM operation.
        /// </summary>
        /// <param name="result">Operation result.</param>
        public override void DoGlobalUpdateCachePre(IStoreResults result)
        {
            if (result.Result == StoreResult.ShardMapDoesNotExist)
            {
                // Remove shard map from cache.
                _manager.Cache.DeleteShardMap(_shardMap);
            }

            if (result.Result == StoreResult.MappingDoesNotExist)
            {
                // Remove mapping from cache.
                _manager.Cache.DeleteMapping(_mapping);
            }
        }
开发者ID:xdansmith,项目名称:elastic-db-tools,代码行数:18,代码来源:FindMappingByIdGlobalOperation.cs

示例8: HandleDoGlobalExecuteError

 /// <summary>
 /// Handles errors from the GSM operation after the LSM operations.
 /// </summary>
 /// <param name="result">Operation result.</param>
 public override void HandleDoGlobalExecuteError(IStoreResults result)
 {
     if (result.Result != StoreResult.ShardMapDoesNotExist)
     {
         // Possible errors are:
         // StoreResult.ShardMapHasShards
         // StoreResult.StoreVersionMismatch
         // StoreResult.MissingParametersForStoredProcedure
         throw StoreOperationErrorHandler.OnShardMapManagerErrorGlobal(
             result,
             _shardMap,
             this.OperationName,
             StoreOperationRequestBuilder.SpRemoveShardMapGlobal);
     }
 }
开发者ID:CrossPoint,项目名称:elastic-db-tools,代码行数:19,代码来源:RemoveShardMapGlobalOperation.cs

示例9: HandleDoGlobalExecuteError

 /// <summary>
 /// Handles errors from the GSM operation after the LSM operations.
 /// </summary>
 /// <param name="result">Operation result.</param>
 public override void HandleDoGlobalExecuteError(IStoreResults result)
 {
     // SchemaInfoNameDoesNotExist is handled by the callers i.e. Get vs TryGet.
     if (result.Result != StoreResult.SchemaInfoNameDoesNotExist)
     {
         // Expected errors are:
         // StoreResult.MissingParametersForStoredProcedure:
         // StoreResult.StoreVersionMismatch:
         throw StoreOperationErrorHandler.OnShardSchemaInfoErrorGlobal(
             result,
             _schemaInfoName,
             this.OperationName,
             StoreOperationRequestBuilder.SpFindShardingSchemaInfoByNameGlobal);
     }
 }
开发者ID:xdansmith,项目名称:elastic-db-tools,代码行数:19,代码来源:FindShardingSchemaInfoGlobalOperation.cs

示例10: HandleDoGlobalExecuteError

        /// <summary>
        /// Handles errors from the GSM operation after the LSM operations.
        /// </summary>
        /// <param name="result">Operation result.</param>
        public override void HandleDoGlobalExecuteError(IStoreResults result)
        {
            if (result.Result == StoreResult.ShardMapDoesNotExist)
            {
                // Remove shard map from cache.
                _shardMapManager.Cache.DeleteShardMap(_shardMap);
            }

            // Possible errors are:
            // StoreResult.ShardMapDoesNotExist
            // StoreResult.StoreVersionMismatch
            // StoreResult.MissingParametersForStoredProcedure
            throw StoreOperationErrorHandler.OnShardMapErrorGlobal(
                result,
                _shardMap,
                null, // shard
                ShardManagementErrorCategory.ShardMap,
                this.OperationName,
                StoreOperationRequestBuilder.SpGetAllShardsGlobal);
        }
开发者ID:xdansmith,项目名称:elastic-db-tools,代码行数:24,代码来源:GetShardsGlobalOperation.cs

示例11: OnShardMapManagerErrorGlobal

        /// <summary>
        /// Returns the proper ShardManagementException corresponding to given error code in 
        /// <paramref name="result"/> for ShardMapManager operations.
        /// </summary>
        /// <param name="result">Operation result object.</param>
        /// <param name="shardMap">Shard map object.</param>
        /// <param name="operationName">Operation being performed.</param>
        /// <param name="storedProcName">Stored procedure being executed.</param>
        /// <returns>ShardManagementException to be raised.</returns>
        internal static ShardManagementException OnShardMapManagerErrorGlobal(
            IStoreResults result,
            IStoreShardMap shardMap,
            string operationName,
            string storedProcName)
        {
            switch (result.Result)
            {
                case StoreResult.ShardMapExists:
                    Debug.Assert(shardMap != null);
                    return new ShardManagementException(
                        ShardManagementErrorCategory.ShardMapManager,
                        ShardManagementErrorCode.ShardMapAlreadyExists,
                        Errors._Store_ShardMap_AlreadyExistsGlobal,
                        shardMap.Name,
                        storedProcName,
                        operationName);

                case StoreResult.ShardMapHasShards:
                    Debug.Assert(shardMap != null);
                    return new ShardManagementException(
                        ShardManagementErrorCategory.ShardMapManager,
                        ShardManagementErrorCode.ShardMapHasShards,
                        Errors._Store_ShardMap_ContainsShardsGlobal,
                        shardMap.Name,
                        storedProcName,
                        operationName);

                case StoreResult.StoreVersionMismatch:
                case StoreResult.MissingParametersForStoredProcedure:
                default:
                    return StoreOperationErrorHandler.OnCommonErrorGlobal(
                        result,
                        operationName,
                        storedProcName);
            }
        }
开发者ID:xdansmith,项目名称:elastic-db-tools,代码行数:46,代码来源:StoreOperationErrorHandler.cs

示例12: DoGlobalUpdateCachePost

        /// <summary>
        /// Refreshes the cache on successful commit of the GSM operation.
        /// </summary>
        /// <param name="result">Operation result.</param>
        public override void DoGlobalUpdateCachePost(IStoreResults result)
        {
            Debug.Assert(
                result.Result == StoreResult.Success ||
                result.Result == StoreResult.MappingNotFoundForKey ||
                result.Result == StoreResult.ShardMapDoesNotExist);

            if (result.Result == StoreResult.Success && _cacheResults)
            {
                foreach (IStoreMapping sm in result.StoreMappings)
                {
                    _manager.Cache.AddOrUpdateMapping(sm, _policy);
                }
            }
        }
开发者ID:xdansmith,项目名称:elastic-db-tools,代码行数:19,代码来源:FindMappingByKeyGlobalOperation.cs

示例13: HandleDoLocalTargetExecuteError

 public virtual void HandleDoLocalTargetExecuteError(IStoreResults result)
 {
     this.inner.HandleDoLocalTargetExecuteError(result);
 }
开发者ID:xdansmith,项目名称:elastic-db-tools,代码行数:4,代码来源:StoreOperationDecorator.cs

示例14: HandleUndoGlobalPostLocalExecuteError

        /// <summary>
        /// Handles errors from the undo of GSM operation after LSM operations.
        /// </summary>
        /// <param name="result">Operation result.</param>
        public override void HandleUndoGlobalPostLocalExecuteError(IStoreResults result)
        {
            if (result.Result == StoreResult.ShardMapDoesNotExist)
            {
                // Remove shard map from cache.
                this.Manager.Cache.DeleteShardMap(_shardMap);
            }

            // Possible errors are:
            // StoreResult.ShardMapDoesNotExist
            // StoreResult.StoreVersionMismatch
            // StoreResult.MissingParametersForStoredProcedure
            throw StoreOperationErrorHandler.OnShardMapperErrorGlobal(
                result,
                _shardMap,
                _mapping.StoreShard,
                _errorCategory,
                StoreOperationErrorHandler.OperationNameFromStoreOperationCode(this.OperationCode),
                StoreOperationRequestBuilder.SpBulkOperationShardMappingsGlobalEnd);
        }
开发者ID:CrossPoint,项目名称:elastic-db-tools,代码行数:24,代码来源:AddMappingOperation.cs

示例15: DoGlobalPostLocalUpdateCache

 /// <summary>
 /// Refreshes the cache on successful commit of the final GSM operation after the LSM operations.
 /// </summary>
 /// <param name="result">Operation result.</param>
 public override void DoGlobalPostLocalUpdateCache(IStoreResults result)
 {
     // Add mapping to cache.
     this.Manager.Cache.AddOrUpdateMapping(_mapping, CacheStoreMappingUpdatePolicy.OverwriteExisting);
 }
开发者ID:CrossPoint,项目名称:elastic-db-tools,代码行数:9,代码来源:AddMappingOperation.cs


注:本文中的IStoreResults类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。