Beispiel #1
0
        private EPStageImpl AllocateStage(
            string stageUri,
            int stageId,
            long stageTime)
        {
            StageSpecificServices  stageSpecificServices = _services.StageRecoveryService.MakeSpecificServices(stageId, stageUri, _services);
            EPStageEventServiceSPI eventService          = _services.StageRecoveryService.MakeEventService(stageSpecificServices, stageId, stageUri, _services);

            stageSpecificServices.Initialize(eventService);
            eventService.InternalEventRouter = stageSpecificServices.InternalEventRouter;

            eventService.SpecificServices.SchedulingService.Time = stageTime;
            EPStageDeploymentServiceImpl deploymentService = new EPStageDeploymentServiceImpl(stageUri, _services, eventService.SpecificServices);
            DestroyCallback stageDestroyCallback           = new ProxyDestroyCallback()
            {
                ProcDestroy = () => {
                    lock (_stages) {
                        _services.StageRecoveryService.StageDestroy(stageUri, stageId);
                        _stages.Remove(stageUri);
                    }
                },
            };

            return(new EPStageImpl(stageUri, stageId, _services, eventService.SpecificServices, eventService, deploymentService, stageDestroyCallback));
        }
Beispiel #2
0
 public EPStageImpl(
     string stageUri,
     int stageId,
     EPServicesContext servicesContext,
     StageSpecificServices stageSpecificServices,
     EPStageEventServiceSPI eventServiceStage,
     EPStageDeploymentServiceImpl deploymentServiceStage,
     DestroyCallback stageDestroyCallback)
 {
     _stageUri               = stageUri;
     _stageId                = stageId;
     _servicesContext        = servicesContext;
     _stageSpecificServices  = stageSpecificServices;
     _eventServiceStage      = eventServiceStage;
     _deploymentServiceStage = deploymentServiceStage;
     _stageDestroyCallback   = stageDestroyCallback;
 }