private void EnqueueItem(BaseReference itemRef)
 {
     AspNetCore.ReportingServices.ReportIntermediateFormat.Persistence.ObjectType objectType = itemRef.GetObjectType();
     if (objectType == AspNetCore.ReportingServices.ReportIntermediateFormat.Persistence.ObjectType.SubReportInstanceReference)
     {
         if (this.m_pinnedItems == null)
         {
             this.m_pinnedItems = new LinkedBucketedQueue <BaseReference>(25);
         }
         this.m_pinnedItems.Enqueue(itemRef);
     }
     else
     {
         ReferenceID id = itemRef.Id;
         if (!id.IsTemporary)
         {
             if (id.HasMultiPart && this.m_partitionManager.GetTreePartitionOffset(id) == TreePartitionManager.EmptyTreePartitionOffset)
             {
                 return;
             }
             this.m_cachePriority.Add(itemRef.Item);
             itemRef.InQueue = InQueueState.Exempt;
         }
     }
 }
예제 #2
0
 public void UnlinkReferences(bool updateId)
 {
     if (base.Reference != (object)null)
     {
         if (updateId)
         {
             base.Reference.Id = this.Id;
         }
         base.Reference.Item = null;
     }
     if (this.m_otherReferences != null)
     {
         while (this.m_otherReferences.Count > 0)
         {
             BaseReference baseReference = this.m_otherReferences.Dequeue();
             baseReference.Item = null;
             if (updateId)
             {
                 baseReference.Id = this.Id;
             }
         }
     }
     base.Reference         = null;
     this.m_otherReferences = null;
 }
 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();
 }
예제 #5
0
 public void AddReference(BaseReference newReference)
 {
     if (base.Reference == (object)null)
     {
         base.Reference = newReference;
     }
     else
     {
         if (this.m_otherReferences == null)
         {
             this.m_otherReferences = new LinkedBucketedQueue <BaseReference>(5);
         }
         this.m_otherReferences.Enqueue(newReference);
     }
 }
 public QueueEnumerator(LinkedBucketedQueue <T> queue)
 {
     this.m_queue = queue;
     this.Reset();
 }