public void Initialize(BasicProcessingUnitContainer container)
        {
            _proxy = container.GetSpaceProxy("My_App");
            _config = new FeederConfiguration(container.Properties);
            _continueFeeding = true;

            _fills = new Data[_config.NumberOfRecords];

            GenerateFills(_fills);
            _proxy.Snapshot(new Data());

            _feederThread = new Thread(Feed);
            _feederThread.Start();
        }
        public void Initialize(BasicProcessingUnitContainer container)
        {
            _proxy           = container.GetSpaceProxy("My_App");
            _config          = new FeederConfiguration(container.Properties);
            _continueFeeding = true;

            _fills = new Data[_config.NumberOfRecords];

            GenerateFills(_fills);
            _proxy.Snapshot(new Data());

            _feederThread = new Thread(Feed);
            _feederThread.Start();
        }
Пример #3
0
        private void StartFeeding(BasicProcessingUnitContainer container)
        {
            //Get feed delay from the custom properties, if none found uses the default one
            string feedDelayStr;

            container.Properties.TryGetValue(FeedDelayProperty, out feedDelayStr);
            _feedDelay = (String.IsNullOrEmpty(feedDelayStr) ? DefaultFeedDelay : int.Parse(feedDelayStr));
            //Gets the proxy to the processing grid
            _proxy = container.GetSpaceProxy("dataExampleSpace");
            //Set the started state to true
            _started = true;
            //Create a working thread
            _feedingThread = new Thread(Feed);
            //Starts the working thread
            _feedingThread.Start();
        }