コード例 #1
0
ファイル: EPStageServiceImpl.cs プロジェクト: lanicon/nesper
        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));
        }
コード例 #2
0
 public override EPStageEventServiceSPI MakeEventService(
     StageSpecificServices stageSpecificServices,
     int stageId,
     string stageUri,
     EPServicesContext servicesContext)
 {
     return(new EPStageEventServiceImpl(stageSpecificServices, servicesContext.StageRuntimeServices, stageUri));
 }
コード例 #3
0
 public EPStageDeploymentServiceImpl(
     string stageUri,
     EPServicesContext servicesContext,
     StageSpecificServices stageSpecificServices)
 {
     this.stageUri = stageUri;
     this.servicesContext = servicesContext;
     this.stageSpecificServices = stageSpecificServices;
 }
コード例 #4
0
ファイル: EPStageImpl.cs プロジェクト: lanicon/nesper
 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;
 }
コード例 #5
0
ファイル: EPStageServiceImpl.cs プロジェクト: lanicon/nesper
        public void RecoverDeployment(
            string stageUri,
            DeploymentInternal deployment)
        {
            string deploymentId = deployment.DeploymentId;

            _services.DeploymentLifecycleService.RemoveDeployment(deploymentId);
            _stages.Get(stageUri).StageSpecificServices.DeploymentLifecycleService.AddDeployment(deploymentId, deployment);

            StageSpecificServices stageSpecificServices = _stages.Get(stageUri).EventServiceSPI.SpecificServices;

            foreach (EPStatement statement in deployment.Statements)
            {
                EPStatementSPI spi = (EPStatementSPI)statement;
                UpdateStatement(spi.StatementContext, stageSpecificServices);

                if (Equals(spi.GetProperty(StatementProperty.STATEMENTTYPE), StatementType.UPDATE))
                {
                    _services.InternalEventRouter.MovePreprocessing(spi.StatementContext, stageSpecificServices.InternalEventRouter);
                }
            }
        }
コード例 #6
0
 public abstract EPStageEventServiceSPI MakeEventService(
     StageSpecificServices stageSpecificServices,
     int stageId,
     string stageUri,
     EPServicesContext servicesContext);