Example #1
0
        internal DistributedContentStoreServices(DistributedContentStoreServicesArguments arguments)
        {
            Arguments = arguments;

            bool isGlobalCacheServiceEnabled = DistributedContentSettings.IsMasterEligible &&
                                               RedisContentLocationStoreConfiguration.AllContentMetadataStoreModeFlags.HasAnyFlag(ContentMetadataStoreModeFlags.Distributed);

            GlobalCacheServiceConfiguration = CreateOptional(
                () => isGlobalCacheServiceEnabled,
                () => CreateGlobalCacheServiceConfiguration());

            GlobalCacheService = CreateOptional(
                () => isGlobalCacheServiceEnabled,
                () => CreateGlobalCacheService());

            RoleObserver = CreateOptional <IRoleObserver>(
                () => isGlobalCacheServiceEnabled && GlobalCacheService.InstanceOrDefault() is ResilientGlobalCacheService,
                () => (ResilientGlobalCacheService)GlobalCacheService.InstanceOrDefault());

            ContentLocationStoreServices = Create(() => ContentLocationStoreFactory.Instance.Services);

            ColdStorage = CreateOptional(() => DistributedContentSettings.ColdStorageSettings != null, () =>
            {
                return(new ColdStorage(Arguments.FileSystem, DistributedContentSettings.ColdStorageSettings, Arguments.DistributedContentCopier));
            });

            ContentLocationStoreFactory = Create(() =>
            {
                return(new ContentLocationStoreFactory(
                           new ContentLocationStoreFactoryArguments()
                {
                    Clock = Arguments.Clock,
                    Copier = Arguments.DistributedContentCopier,
                    ConnectionPool = Arguments.ConnectionPool,
                    Dependencies = new ContentLocationStoreServicesDependencies()
                    {
                        GlobalCacheService = GlobalCacheService.UnsafeGetServiceDefinition().AsOptional <IGlobalCacheService>(),
                        ColdStorage = ColdStorage,
                        RoleObserver = RoleObserver
                    }
                },
                           Arguments.RedisContentLocationStoreConfiguration));
            });

            CacheServiceBlobCheckpointRegistry = CreateOptional(
                () => DistributedContentSettings.ContentMetadataUseBlobCheckpointRegistry,
                () => CreateCacheServiceBlobCheckpointRegistry());

            RedisWriteAheadEventStorage = Create(() => CreateRedisWriteAheadEventStorage());

            CacheServiceCheckpointRegistry = Create(() => CreateCacheServiceCheckpointRegistry());
        }
Example #2
0
        /// <summary>
        /// Khởi tạo lại cache
        /// </summary>
        internal override void RefreshCache()
        {
            GlobalCacheService globalcacheservice = new GlobalCacheService();

            globalcacheservice.LoadCache(CacheType.DMNhomDichVu);
        }
Example #3
0
        /// <summary>
        /// Khởi tạo lại cache
        /// </summary>
        internal override void RefreshCache()
        {
            GlobalCacheService globalcacheservice = new GlobalCacheService();

            globalcacheservice.LoadCache(CacheType.PatientsObject);
        }
Example #4
0
        /// <summary>
        /// Khởi tạo lại cache
        /// </summary>
        internal override void RefreshCache()
        {
            GlobalCacheService globalcacheservice = new GlobalCacheService();

            globalcacheservice.LoadCache(CacheType.Permission);
        }
Example #5
0
        /// <summary>
        /// Khởi tạo lại cache
        /// </summary>
        internal override void RefreshCache()
        {
            GlobalCacheService globalcacheservice = new GlobalCacheService();

            globalcacheservice.LoadCache(CacheType.DMTinhThanh);
        }
Example #6
0
        /// <summary>
        /// Khởi tạo lại cache
        /// </summary>
        internal override void RefreshCache()
        {
            GlobalCacheService globalcacheservice = new GlobalCacheService();

            globalcacheservice.LoadCache(CacheType.Department);
        }
Example #7
0
        /// <summary>
        /// Khởi tạo lại cache
        /// </summary>
        internal override void RefreshCache()
        {
            GlobalCacheService globalcacheservice = new GlobalCacheService();

            globalcacheservice.LoadCache(CacheType.AssetsCate);
        }
Example #8
0
        /// <summary>
        /// Khởi tạo lại cache
        /// </summary>
        internal override void RefreshCache()
        {
            GlobalCacheService globalcacheservice = new GlobalCacheService();

            globalcacheservice.LoadCache(CacheType.DMQuanHuyen);
        }
Example #9
0
        internal virtual void RefreshCache()
        {
            GlobalCacheService globalcacheservice = new GlobalCacheService();

            globalcacheservice.LoadCache(_cacheType);
        }
Example #10
0
        /// <summary>
        /// Khởi tạo lại cache
        /// </summary>
        internal override void RefreshCache()
        {
            GlobalCacheService globalcacheservice = new GlobalCacheService();

            globalcacheservice.LoadCache(CacheType.SystemConfig);
        }