public DataFileDefrag(Database db, DataFileCache cache, string dataFileName) { this._database = db; this._cache = cache; this._scale = cache.CacheFileScale; this._dataFileName = dataFileName; }
public DataFileCache GetCache() { if (this._cache == null) { this._cache = new DataFileCache(); this._cache.InitParams(this._database, this._fileName); this._cache.Open(this._filesReadOnly); } return(this._cache); }
public Cache(DataFileCache dfc) : base(dfc.Capacity(), 1, 3, true) { this._saveAllTimer = new StopWatch(false); this._sortTimer = new StopWatch(false); base.MaxCapacity = dfc.Capacity(); this.dataFileCache = dfc; this._capacity = dfc.Capacity(); this._bytesCapacity = dfc.BytesCapacity(); this._rowComparator = new CachedObjectComparator(); this._rowTable = new ICachedObject[this._capacity]; this._cacheBytesLength = 0L; }
public IPersistentStore NewStore(Session session, IPersistentStoreCollection collection, TableBase table, bool diskBased) { switch (table.GetTableType()) { case 1: case 4: case 11: return(new RowStoreAVLMemory(collection, (Table)table)); case 2: case 8: case 10: break; case 3: diskBased = false; break; case 5: { DataFileCache cache = this.GetCache(); if (cache == null) { goto Label_0093; } RowStoreAVLDisk item = new RowStoreAVLDisk(collection, cache, (Table)table); this._createdStores.Add(item); return(item); } case 9: if (session != null) { return(new RowStoreAVLHybrid(session, collection, table)); } return(null); default: goto Label_0093; } if (session == null) { return(null); } return(new RowStoreAVLHybrid(session, collection, table, diskBased)); Label_0093: throw Error.RuntimeError(0xc9, "Logger"); }
public RowStoreAVLDisk(IPersistentStoreCollection manager, DataFileCache cache, Table table) { this._database = table.database; base.Manager = manager; base.table = table; base.indexList = table.GetIndexList(); base.AccessorList = new ICachedObject[base.indexList.Length]; this._cache = cache; if (cache != null) { this.RowOut = cache.RowOut.Duplicate(); } manager.SetStore(table, this); this._database = table.database; }
public override void SetCache(DataFileCache cache) { throw Error.RuntimeError(0xc9, "RowStoreAVLHybrid"); }
public override void SetCache(DataFileCache cache) { this._cache = cache; }
public override void Release() { ArrayUtil.FillArray(base.AccessorList, null); this._cache = null; }
public abstract void SetCache(DataFileCache cache);
public override void SetCache(DataFileCache cache) { }