예제 #1
0
 public void AddReference(BaseReference newReference)
 {
     if (Reference == null)
     {
         Reference = newReference;
         return;
     }
     if (m_otherReferences == null)
     {
         m_otherReferences = new LinkedBucketedQueue <BaseReference>(5);
     }
     m_otherReferences.Enqueue(newReference);
 }
예제 #2
0
        private void EnqueueItem(BaseReference itemRef)
        {
            Microsoft.ReportingServices.ReportIntermediateFormat.Persistence.ObjectType objectType = itemRef.GetObjectType();
            if (objectType == Microsoft.ReportingServices.ReportIntermediateFormat.Persistence.ObjectType.SubReportInstanceReference)
            {
                if (m_pinnedItems == null)
                {
                    m_pinnedItems = new LinkedBucketedQueue <BaseReference>(25);
                }
                m_pinnedItems.Enqueue(itemRef);
                return;
            }
            ReferenceID id = itemRef.Id;

            if (!id.IsTemporary && (!id.HasMultiPart || m_partitionManager.GetTreePartitionOffset(id) != TreePartitionManager.EmptyTreePartitionOffset))
            {
                m_cachePriority.Add(itemRef.Item);
                itemRef.InQueue = InQueueState.Exempt;
            }
        }
예제 #3
0
 internal sealed override void UnPin(BaseReference reference)
 {
     if (reference.PinCount == 0 && (reference.Id.IsTemporary || reference.Id.HasMultiPart) && reference.InQueue == InQueueState.None)
     {
         reference.InQueue = InQueueState.InQueue;
         m_serializationQueue.Enqueue(reference);
         if (!m_lockedDownForFlush)
         {
             ItemHolder item = reference.Item;
             IStorable  obj  = null;
             if (item != null)
             {
                 obj = item.Item;
             }
             m_cacheFreeableBytes += ItemSizes.SizeOf(obj);
         }
     }
     if (!m_lockedDownForFlush)
     {
         PeriodicOperationCheck();
     }
 }