public BTree(Transaction trans, BTreeConfiguration config, int id, IIndexable4 keyHandler , int treeNodeSize) : base(config._idSystem) { _config = config; if (null == keyHandler) { throw new ArgumentNullException(); } _nodeSize = treeNodeSize; _nodeCache = CacheFactory.NewLRUIntCache(config._cacheSize); _halfNodeSize = _nodeSize / 2; _nodeSize = _halfNodeSize * 2; _keyHandler = keyHandler; SetID(id); if (IsNew()) { SetStateDirty(); _root = new BTreeNode(this, 0, true, 0, 0, 0); _root.Write(trans.SystemTransaction()); AddNode(_root); Write(trans.SystemTransaction()); } else { SetStateDeactivated(); } }
public SynchronizedCache(ICache4 <TKey, TValue> implementation) { if (null == implementation) { throw new ArgumentNullException("implementation"); } this.implementation = implementation; }
public virtual void TestProduce() { object obj = new object(); ICache4 cache = ((ICache4)SubjectFixtureProvider.Value()); object value = cache.Produce(1, new _IFunction4_39(obj), null); Assert.AreSame(obj, value); Assert.AreSame(obj, cache.Produce(1, null, null)); }
/// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception> public CachingBin(IBin bin, ICache4 cache, int pageCount, int pageSize) : base(bin ) { _onDiscardPage = new _IProcedure4_22(this); _producerFromDisk = new _IFunction4_138(this); _producerFromPool = new _IFunction4_147(this); _pageSize = pageSize; _pagePool = new SimpleObjectPool(NewPagePool(pageCount)); _cache = cache; _fileLength = _bin.Length(); }
public static ICache4 <TKey, TValue> For(ICache4 cache4, IEqualityComparer <TKey> comparer) { return(new Cache4CachingStrategyWithComparer <TKey, TValue>(cache4, comparer)); }
public static ICache4 <TKey, TValue> For(ICache4 cache4) { return(new Cache4CachingStrategy <TKey, TValue>(cache4)); }
public TracingCacheDecorator(ICache4 <TKey, TValue> @delegate) { _delegate = @delegate; }
/// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception> public NonFlushingCachingBin(IBin bin, ICache4 cache, int pageCount, int pageSize ) : base(bin, cache, pageCount, pageSize) { }
private MetadataResolver() { _assemblyCache = CacheFactory <Assembly, AssemblyDefinition> .For(CacheFactory.New2QXCache(5)); _methodCache = CacheFactory <MethodInfo, MethodDefinition> .For(CacheFactory.New2QXCache(5)); }
private MetadataResolver() { _assemblyCache = CacheFactory<Assembly, AssemblyDefinition>.For(CacheFactory.New2QXCache(5)); _methodCache = CacheFactory<MethodInfo, MethodDefinition>.For(CacheFactory.New2QXCache(5)); }
public CacheStatistics(ICache4 delegate_) { _delegate = delegate_; }
public Cache4CachingStrategy(ICache4 cache4) { _cache4 = cache4; }
public Cache4CachingStrategyWithComparer(ICache4 cache4, IEqualityComparer <TKey> comparer) : base(cache4) { _comparer = comparer; }
private static ICache4 <TKey, TValue> SynchonizedCache(ICache4 <TKey, TValue> cacheImplementation) { return(new SynchronizedCache <TKey, TValue>(cacheImplementation)); }