예제 #1
0
        /// <inheritdoc />
        protected override async Task <BoolResult> ShutdownCoreAsync(OperationContext context)
        {
            var results = new List <Tuple <string, BoolResult> >();

            var innerResult = await InnerContentStore.ShutdownAsync(context);

            results.Add(Tuple.Create(nameof(InnerContentStore), innerResult));

            _evictionNagleQueue?.Dispose();
            _touchNagleQueue?.Dispose();

            var locationStoreResult = await _contentLocationStore.ShutdownAsync(context);

            results.Add(Tuple.Create(nameof(_contentLocationStore), locationStoreResult));

            var factoryResult = await _contentLocationStoreFactory.ShutdownAsync(context);

            results.Add(Tuple.Create(nameof(_contentLocationStoreFactory), factoryResult));

            if (_distributedCopier != null)
            {
                var copierResult = await _distributedCopier.ShutdownAsync(context);

                results.Add(Tuple.Create(nameof(_distributedCopier), copierResult));
            }

            return(ShutdownErrorCompiler(results));
        }
예제 #2
0
        protected override async Task <BoolResult> ShutdownCoreAsync(OperationContext context)
        {
            BoolResult sessionResult = _session != null ? await _session.ShutdownAsync(context) : BoolResult.Success;

            BoolResult storeResult = await _store.ShutdownAsync(context);

            BoolResult copierResult = await _copier.ShutdownAsync(context);

            return(sessionResult & storeResult & copierResult);
        }
예제 #3
0
        /// <inheritdoc />
        protected override async Task <BoolResult> ShutdownCoreAsync(OperationContext context)
        {
            var results = new List <Tuple <string, BoolResult> >();

            if (_proactiveCopySession?.IsValueCreated == true)
            {
                var sessionResult = await _proactiveCopySession.Value;
                if (sessionResult.Succeeded)
                {
                    var proactiveCopySessionShutdownResult = await sessionResult.Value.ShutdownAsync(context);

                    results.Add(Tuple.Create(nameof(_proactiveCopySession), proactiveCopySessionShutdownResult));
                }
            }

            var innerResult = await InnerContentStore.ShutdownAsync(context);

            results.Add(Tuple.Create(nameof(InnerContentStore), innerResult));

            _evictionNagleQueue?.Dispose();
            _touchNagleQueue?.Dispose();

            if (_contentLocationStore != null)
            {
                var locationStoreResult = await _contentLocationStore.ShutdownAsync(context);

                results.Add(Tuple.Create(nameof(_contentLocationStore), locationStoreResult));
            }

            var factoryResult = await _contentLocationStoreFactory.ShutdownAsync(context);

            results.Add(Tuple.Create(nameof(_contentLocationStoreFactory), factoryResult));

            if (_distributedCopier != null)
            {
                var copierResult = await _distributedCopier.ShutdownAsync(context);

                results.Add(Tuple.Create(nameof(_distributedCopier), copierResult));
            }

            return(ShutdownErrorCompiler(results));
        }