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