public Cache(string name, CacheConfiguration configuration) { if (configuration == null) { throw new NullReferenceException("CacheConfiguration is NULL."); } if (configuration.Logger != null) { configuration.Logger.Log("Create a new cache: " + name, Category.Info, Priority.High); } this.proxy = new CacheProxy(name, configuration); }
public ICache Create(string name, CacheConfiguration configuration) { if (this.Contains(name) != null) { return null; } if (configuration == null) { throw new NullReferenceException("configuration is NULL."); } ICache cache = new Cache(name, configuration); this.caches.Add(cache); return cache; }
public void Adjust(CacheConfiguration configuration) { this.proxy.Adjust(configuration); }
protected abstract void DoAdjust(CacheConfiguration configuration);
public void Adjust(CacheConfiguration configuration) { this.DoAdjust(configuration); this.Signal(); }
private void ConfigureHierarchy(CacheConfiguration configuration) { this.scheduler = SchedulerBase.Factory.Create(configuration.SchedulerConfiguration, configuration.Logger); }
protected override void DoAdjust(CacheConfiguration configuration) { this.scheduler.Adjust(configuration.SchedulerConfiguration); }
public CacheProxy(string name, CacheConfiguration configuration) : base(name) { this.ConfigureHierarchy(configuration); }