public void StepTwo()
        {
            IRegion <object, object> region0    = CacheHelper.GetRegion <object, object>(QueryRegionNames[0]);
            IRegion <object, object> subRegion0 = region0.GetSubRegion(QueryRegionNames[1]);
            IRegion <object, object> region1    = CacheHelper.GetRegion <object, object>(QueryRegionNames[1]);
            IRegion <object, object> region2    = CacheHelper.GetRegion <object, object>(QueryRegionNames[2]);
            IRegion <object, object> region3    = CacheHelper.GetRegion <object, object>(QueryRegionNames[3]);

            QueryHelper <object, object> qh = QueryHelper <object, object> .GetHelper(CacheHelper.DCache);

            Util.Log("SetSize {0}, NumSets {1}.", qh.PortfolioSetSize,
                     qh.PortfolioNumSets);

            string[] cnm = { "C#aaa", "C#bbb", "C#ccc", "C#ddd" };
            //CacheableStringArray cnm = CacheableStringArray.Create(sta);
            qh.PopulatePortfolioData(region0, qh.PortfolioSetSize,
                                     qh.PortfolioNumSets, 1, cnm);
            qh.PopulatePositionData(subRegion0, qh.PortfolioSetSize,
                                    qh.PortfolioNumSets);
            qh.PopulatePositionData(region1, qh.PortfolioSetSize,
                                    qh.PortfolioNumSets);
            qh.PopulatePortfolioData(region2, qh.PortfolioSetSize,
                                     qh.PortfolioNumSets, 1, cnm);
            qh.PopulatePortfolioData(region3, qh.PortfolioSetSize,
                                     qh.PortfolioNumSets, 1, cnm);
        }
        public void StepTwoQT()
        {
            IRegion <object, object> region0    = CacheHelper.GetRegion <object, object>(QueryRegionNames[0]);
            IRegion <object, object> subRegion0 = region0.GetSubRegion(QueryRegionNames[1]);

            QueryHelper <object, object> qh = QueryHelper <object, object> .GetHelper(CacheHelper.DCache);

            qh.PopulatePortfolioData(region0, 100, 20, 100);
            qh.PopulatePositionData(subRegion0, 100, 20);
        }
        public void StepTwoQT()
        {
            IRegion <object, object> region0    = CacheHelper.GetRegion <object, object>(QueryRegionNames[0]);
            IRegion <object, object> subRegion0 = region0.GetSubRegion(QueryRegionNames[1]);

            QueryHelper <object, object> qh = QueryHelper <object, object> .GetHelper(CacheHelper.DCache);

            string[] /*sta*/ cnm = { "C#aaa", "C#bbb", "C#ccc", "C#ddd" };
            //CacheableStringArray cnm = CacheableStringArray.Create(sta);
            qh.PopulatePortfolioData(region0, 4, 2, 2, cnm);
            qh.PopulatePositionData(subRegion0, 4, 2);
        }
Exemplo n.º 4
0
        private IRegion <TKey, TValue> CreateSubregion <TKey, TValue>(IRegion <TKey, TValue> region)
        {
            Util.Log("CreateSubregion " + SubregionName);
            IRegion <TKey, TValue> subregion = region.GetSubRegion(SubregionName);

            if (subregion == null)
            {
                //subregion = region.CreateSubRegion(SubregionName, region.Attributes);
                subregion = CacheHelper.GetRegion <TKey, TValue>(region.FullPath).CreateSubRegion(SubregionName, region.Attributes);
            }
            return(subregion);
        }
        public void StepTwo(bool usePdxObject)
        {
            IRegion <object, object> region0    = CacheHelper.GetRegion <object, object>(QueryRegionNames[0]);
            IRegion <object, object> subRegion0 = region0.GetSubRegion(QueryRegionNames[1]);
            IRegion <object, object> region1    = CacheHelper.GetRegion <object, object>(QueryRegionNames[1]);
            IRegion <object, object> region2    = CacheHelper.GetRegion <object, object>(QueryRegionNames[2]);
            IRegion <object, object> region3    = CacheHelper.GetRegion <object, object>(QueryRegionNames[3]);

            QueryHelper <object, object> qh = QueryHelper <object, object> .GetHelper(CacheHelper.DCache);

            Util.Log("Object type is pdx = " + m_usePdxObjects);

            Util.Log("SetSize {0}, NumSets {1}.", qh.PortfolioSetSize,
                     qh.PortfolioNumSets);

            if (!usePdxObject)
            {
                qh.PopulatePortfolioData(region0, qh.PortfolioSetSize,
                                         qh.PortfolioNumSets);
                qh.PopulatePositionData(subRegion0, qh.PortfolioSetSize,
                                        qh.PortfolioNumSets);
                qh.PopulatePositionData(region1, qh.PortfolioSetSize,
                                        qh.PortfolioNumSets);
                qh.PopulatePortfolioData(region2, qh.PortfolioSetSize,
                                         qh.PortfolioNumSets);
                qh.PopulatePortfolioData(region3, qh.PortfolioSetSize,
                                         qh.PortfolioNumSets);
            }
            else
            {
                CacheHelper.DCache.TypeRegistry.RegisterPdxType(PortfolioPdx.CreateDeserializable);
                CacheHelper.DCache.TypeRegistry.RegisterPdxType(PositionPdx.CreateDeserializable);
                qh.PopulatePortfolioPdxData(region0, qh.PortfolioSetSize,
                                            qh.PortfolioNumSets);
                qh.PopulatePortfolioPdxData(subRegion0, qh.PortfolioSetSize,
                                            qh.PortfolioNumSets);
                qh.PopulatePortfolioPdxData(region1, qh.PortfolioSetSize,
                                            qh.PortfolioNumSets);
                qh.PopulatePortfolioPdxData(region2, qh.PortfolioSetSize,
                                            qh.PortfolioNumSets);
                qh.PopulatePortfolioPdxData(region3, qh.PortfolioSetSize,
                                            qh.PortfolioNumSets);
            }
        }
Exemplo n.º 6
0
        public void StepTwo(bool isPdx)
        {
            m_isPdx = isPdx;
            IRegion <object, object> region0    = CacheHelper.GetRegion <object, object>(QueryRegionNames[0]);
            IRegion <object, object> subRegion0 = (IRegion <object, object>)region0.GetSubRegion(QueryRegionNames[1]);
            IRegion <object, object> region1    = CacheHelper.GetRegion <object, object>(QueryRegionNames[1]);
            IRegion <object, object> region2    = CacheHelper.GetRegion <object, object>(QueryRegionNames[2]);
            IRegion <object, object> region3    = CacheHelper.GetRegion <object, object>(QueryRegionNames[3]);

            QueryHelper <object, object> qh = QueryHelper <object, object> .GetHelper(CacheHelper.DCache);

            Util.Log("SetSize {0}, NumSets {1}.", qh.PortfolioSetSize,
                     qh.PortfolioNumSets);

            if (!m_isPdx)
            {
                qh.PopulatePortfolioData(region0, qh.PortfolioSetSize,
                                         qh.PortfolioNumSets);
                qh.PopulatePositionData(subRegion0, qh.PortfolioSetSize,
                                        qh.PortfolioNumSets);
                qh.PopulatePositionData(region1, qh.PortfolioSetSize,
                                        qh.PortfolioNumSets);
                qh.PopulatePortfolioData(region2, qh.PortfolioSetSize,
                                         qh.PortfolioNumSets);
                qh.PopulatePortfolioData(region3, qh.PortfolioSetSize,
                                         qh.PortfolioNumSets);
            }
            else
            {
                qh.PopulatePortfolioPdxData(region0, qh.PortfolioSetSize,
                                            qh.PortfolioNumSets);
                qh.PopulatePositionPdxData(subRegion0, qh.PortfolioSetSize,
                                           qh.PortfolioNumSets);
                qh.PopulatePositionPdxData(region1, qh.PortfolioSetSize,
                                           qh.PortfolioNumSets);
                qh.PopulatePortfolioPdxData(region2, qh.PortfolioSetSize,
                                            qh.PortfolioNumSets);
                qh.PopulatePortfolioPdxData(region3, qh.PortfolioSetSize,
                                            qh.PortfolioNumSets);
            }
        }
        public void PopulateRegions()
        {
            IRegion <object, object> region0    = CacheHelper.GetRegion <object, object>(QueryRegionNames[0]);
            IRegion <object, object> subRegion0 = (IRegion <object, object>)region0.GetSubRegion(QueryRegionNames[1]);
            IRegion <object, object> region1    = CacheHelper.GetRegion <object, object>(QueryRegionNames[1]);
            IRegion <object, object> region2    = CacheHelper.GetRegion <object, object>(QueryRegionNames[2]);
            IRegion <object, object> region3    = CacheHelper.GetRegion <object, object>(QueryRegionNames[3]);

            QueryHelper <object, object> qh = QueryHelper <object, object> .GetHelper();

            Util.Log("SetSize {0}, NumSets {1}.", qh.PortfolioSetSize,
                     qh.PortfolioNumSets);

            qh.PopulatePortfolioPdxData(region0, qh.PortfolioSetSize,
                                        qh.PortfolioNumSets);
            qh.PopulatePositionPdxData(subRegion0, qh.PortfolioSetSize,
                                       qh.PortfolioNumSets);
            qh.PopulatePositionPdxData(region1, qh.PortfolioSetSize,
                                       qh.PortfolioNumSets);
            qh.PopulatePortfolioPdxData(region2, qh.PortfolioSetSize,
                                        qh.PortfolioNumSets);
            qh.PopulatePortfolioPdxData(region3, qh.PortfolioSetSize,
                                        qh.PortfolioNumSets);
        }