public void DisposePersistedTreeScalability()
 {
     if (this.m_groupTreeScalabilityCache != null)
     {
         this.m_groupTreeScalabilityCache.Dispose();
         this.m_groupTreeScalabilityCache = null;
     }
     if (this.m_lookupScalabilityCache != null)
     {
         this.m_lookupScalabilityCache.Dispose();
         this.m_lookupScalabilityCache = null;
     }
 }
示例#2
0
            public void SerializeSnapshot()
            {
                Global.Tracer.Assert(null != this.m_odpContext, "OnDemandProcessingContext is unavailable");
                OnDemandMetadata odpMetadata = this.m_odpContext.OdpMetadata;

                if (odpMetadata.SnapshotHasChanged)
                {
                    try
                    {
                        IReference <ReportInstance> reportInstance = odpMetadata.ReportInstance;
                        Global.Tracer.Assert(reportInstance != null, "Missing GroupTreeRoot");
                        if (odpMetadata.IsInitialProcessingRequest)
                        {
                            reportInstance.UnPinValue();
                        }
                        if (odpMetadata.GroupTreeHasChanged || odpMetadata.IsInitialProcessingRequest)
                        {
                            GroupTreeScalabilityCache groupTreeScalabilityCache = this.m_odpContext.OdpMetadata.GroupTreeScalabilityCache;
                            groupTreeScalabilityCache.Flush();
                            if (odpMetadata.IsInitialProcessingRequest)
                            {
                                GroupTreePartition groupTreePartition = new GroupTreePartition();
                                groupTreePartition.AddTopLevelScopeInstance((IReference <ScopeInstance>)reportInstance);
                                long groupTreeRootOffset = groupTreeScalabilityCache.Storage.Allocate(groupTreePartition);
                                groupTreeScalabilityCache.Storage.Flush();
                                odpMetadata.GroupTreeRootOffset = groupTreeRootOffset;
                            }
                        }
                        if (odpMetadata.LookupInfoHasChanged)
                        {
                            LookupScalabilityCache lookupScalabilityCache = this.m_odpContext.OdpMetadata.LookupScalabilityCache;
                            lookupScalabilityCache.Flush();
                        }
                        OnDemandProcessingManager.SerializeMetadata(this.m_odpContext.ChunkFactory, this.m_odpContext.OdpMetadata, this.m_odpContext.GetActiveCompatibilityVersion(), this.m_odpContext.ProhibitSerializableValues);
                        OnDemandProcessingManager.SerializeSortFilterEventInfo(this.m_odpContext);
                    }
                    finally
                    {
                        if (odpMetadata != null)
                        {
                            odpMetadata.DisposePersistedTreeScalability();
                        }
                    }
                }
            }
示例#3
0
        internal ReportInstance(OnDemandProcessingContext odpContext, Report reportDef, ParameterInfoCollection parameters)
        {
            int count = reportDef.MappingNameToDataSet.Count;

            m_dataSetInstances = new DataSetInstance[count];
            List <DataRegion> topLevelDataRegions = reportDef.TopLevelDataRegions;

            if (topLevelDataRegions != null)
            {
                GroupTreeScalabilityCache groupTreeScalabilityCache = odpContext.OdpMetadata.GroupTreeScalabilityCache;
                int count2 = topLevelDataRegions.Count;
                m_dataRegionInstances = new List <IReference <DataRegionInstance> >(count2);
                for (int i = 0; i < count2; i++)
                {
                    m_dataRegionInstances.Add(groupTreeScalabilityCache.AllocateEmptyTreePartition <DataRegionInstance>(Microsoft.ReportingServices.ReportIntermediateFormat.Persistence.ObjectType.DataRegionInstanceReference));
                }
            }
        }
        internal static IReference <DataRegionInstance> CreateInstance(ScopeInstance parentInstance, OnDemandMetadata odpMetadata, DataRegion dataRegionDef, int dataSetIndex)
        {
            DataRegionInstance              dataRegionInstance        = new DataRegionInstance(dataRegionDef, dataSetIndex);
            GroupTreeScalabilityCache       groupTreeScalabilityCache = odpMetadata.GroupTreeScalabilityCache;
            IReference <DataRegionInstance> reference;

            if (parentInstance.ObjectType == Microsoft.ReportingServices.ReportIntermediateFormat.Persistence.ObjectType.ReportInstance)
            {
                reference = ((ReportInstance)parentInstance).GetTopLevelDataRegionReference(dataRegionDef.IndexInCollection);
                groupTreeScalabilityCache.SetTreePartitionContentsAndPin(reference, dataRegionInstance);
            }
            else
            {
                reference = groupTreeScalabilityCache.AllocateAndPin(dataRegionInstance, 0);
                parentInstance.AddChildScope((IReference <ScopeInstance>)reference, dataRegionDef.IndexInCollection);
            }
            dataRegionInstance.m_cleanupRef = (IDisposable)reference;
            return(reference);
        }