public PartitionedTreeScalabilityCache(TreePartitionManager partitionManager, IStorage storage, long cacheExpansionIntervalMs, double cacheExpansionRatio, long minReservedMemoryBytes)
     : base(storage, cacheExpansionIntervalMs, cacheExpansionRatio, ComponentType.Processing, minReservedMemoryBytes)
 {
     this.m_serializationQueue = new LinkedBucketedQueue <BaseReference>(100);
     this.m_cachePriority      = new LinkedLRUCache <ItemHolder>();
     this.m_cacheFreeableBytes = 0L;
     this.m_partitionManager   = partitionManager;
 }
 public sealed override void Dispose()
 {
     this.m_cacheLookup        = null;
     this.m_cachePriority      = null;
     this.m_serializationQueue = null;
     this.m_pinnedItems        = null;
     base.Dispose();
 }
Exemple #3
0
 public override void Dispose()
 {
     try
     {
         if (this.m_offsetMap != null)
         {
             this.m_offsetMap.Close();
             this.m_offsetMap = null;
         }
         this.m_cacheLookup      = null;
         this.m_cachePriority    = null;
         this.m_staticIdLookup   = null;
         this.m_staticReferences = null;
     }
     finally
     {
         base.Dispose();
     }
 }
Exemple #4
0
 public ScalabilityCache(IStorage storage, IIndexStrategy indexStrategy, ComponentType ownerComponent, long minReservedMemoryBytes)
     : base(storage, 3000L, 0.2, ownerComponent, minReservedMemoryBytes)
 {
     this.m_cachePriority = new LinkedLRUCache <StorageItem>();
     this.m_offsetMap     = indexStrategy;
 }