protected FixedSizeCollection(DataFile data, int recordSize) { if (recordSize <= 0) throw new ArgumentException(); this.data = data; this.recordSize = recordSize; keyPositionCache = new MemoryCache(513, 750, 15); }
public LocalRowCache(DeveelDbConnection connection) { this.connection = connection; if (connection.Settings != null) { rowCache = new SizeLimitedCache (connection.Settings.RowCacheSize); } else { int defaultCacheSize = new DeveelDbConnectionStringBuilder ().RowCacheSize; rowCache = new SizeLimitedCache (defaultCacheSize); } }
public StoreTreeSystem(IStore nodeStore, int maxBranchChildren, int maxLeafSize, long nodeMaxCacheMemory, long branchCacheMemory) { maxBranchSize = maxBranchChildren; maxLeafByteSize = maxLeafSize; this.nodeStore = nodeStore; nodeHeapMaxSize = nodeMaxCacheMemory; versions = new List<VersionInfo>(); // Allocate some values for the branch cache, long branchSizeEstimate = (maxBranchChildren*24) + 64; // The number of elements in the branch cache int branchCacheElements = (int) (branchCacheMemory/branchSizeEstimate); // Find a close prime to this int branchPrime = Cache.ClosestPrime(branchCacheElements + 20); // Allocate the cache branchCache = new MemoryCache(branchPrime, branchCacheElements, 20); initialized = false; }
public LocalRowCache(DeveelDbConnection connection) { this.connection = connection; rowCache = new SizeLimitedCache(connection.Settings.RowCacheSize); }
public LocalRowCache(DeveelDbConnection connection) { this.connection = connection; rowCache = new MemoryCache(connection.Settings.RowCacheSize, connection.Settings.MaxCacheSize, 20); }