• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IStoreResults类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: HandleUndoLocalSourceExecuteError

 /// <summary>
 /// Handles errors from the undo of LSM operation on the source shard.
 /// </summary>
 /// <param name="result">Operation result.</param>
 public override void HandleUndoLocalSourceExecuteError(IStoreResults result)
 {
     // Possible errors are:
     // StoreResult.StoreVersionMismatch
     // StoreResult.MissingParametersForStoredProcedure
     throw StoreOperationErrorHandler.OnShardMapErrorLocal(
         result,
         _shardMap,
         _shard.Location,
         ShardManagementErrorCategory.ShardMap,
         StoreOperationErrorHandler.OperationNameFromStoreOperationCode(this.OperationCode),
         StoreOperationRequestBuilder.SpAddShardLocal);
 }
开发者ID:CrossPoint,项目名称:elastic-db-tools,代码行数:17,代码来源:AddShardOperation.cs


示例17: 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.ShardMapDoesNotExist);

            if (result.Result == StoreResult.Success)
            {
                // Remove cache entry.
                _shardMapManager.Cache.DeleteShardMap(_shardMap);
            }
        }
开发者ID:CrossPoint,项目名称:elastic-db-tools,代码行数:15,代码来源:RemoveShardMapGlobalOperation.cs


示例18: HandleDoLocalExecuteError

 /// <summary>
 /// Handles errors from the LSM operation.
 /// </summary>
 /// <param name="result">Operation result.</param>
 public override void HandleDoLocalExecuteError(IStoreResults result)
 {
     if (!_ignoreFailure || result.Result != StoreResult.ShardMapDoesNotExist)
     {
         // Possible errors are:
         // StoreResult.ShardMapDoesNotExist
         // StoreResult.StoreVersionMismatch
         // StoreResult.MissingParametersForStoredProcedure
         throw StoreOperationErrorHandler.OnRecoveryErrorLocal(
             result,
             _shardMap,
             this.Location,
             ShardManagementErrorCategory.Recovery,
             this.OperationName,
             StoreOperationRequestBuilder.SpGetAllShardMappingsLocal);
     }
 }
开发者ID:CrossPoint,项目名称:elastic-db-tools,代码行数:21,代码来源:GetMappingsByRangeLocalOperation.cs


示例19: HandleUndoGlobalPostLocalExecuteError

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


示例20: HandleUndoLocalSourceExecuteError

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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IStoreService类代码示例发布时间:2022-05-24
下一篇:
C# IStoreMappingService类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap