protected override void PostProcess( bool force, UniformPair<EventBean[]> newOldEvents, UpdateDispatchView childView) { _postProcessor.Output(force, newOldEvents, childView); }
protected virtual void PostProcess( bool force, UniformPair<EventBean[]> newOldEvents, UpdateDispatchView childView) { OutputStrategyUtil.Output(force, newOldEvents, childView); }
public bool RemoveView(View view) { if (view != ChildView) { throw new IllegalStateException("Cannot remove child view, view has not been supplied"); } ChildView = null; return(true); }
public View AddView(View view) { if (ChildView != null) { throw new IllegalStateException("Child view has already been supplied"); } ChildView = (UpdateDispatchView)view; return(this); }
public EPStatementFactoryArgs( StatementContext statementContext, UpdateDispatchView dispatchChildView, StatementResultServiceImpl statementResultService) { StatementContext = statementContext; DispatchChildView = dispatchChildView; StatementResultService = statementResultService; }
public StatementContext( IContainer container, ContextRuntimeDescriptor contextRuntimeDescriptor, string deploymentId, int statementId, string statementName, string moduleName, StatementInformationalsRuntime statementInformationals, object userObjectRuntime, StatementContextRuntimeServices statementContextRuntimeServices, EPStatementHandle epStatementHandle, IDictionary<int, FilterSpecActivatable> filterSpecActivatables, PatternSubexpressionPoolStmtSvc patternSubexpressionPoolSvc, RowRecogStatePoolStmtSvc rowRecogStatePoolStmtSvc, ScheduleBucket scheduleBucket, StatementAIResourceRegistry statementAIResourceRegistry, StatementCPCacheService statementCPCacheService, StatementAIFactoryProvider statementAIFactoryProvider, StatementResultService statementResultService, UpdateDispatchView updateDispatchView, FilterService filterService, SchedulingService schedulingService, InternalEventRouteDest internalEventRouteDest) { Container = container; ContextRuntimeDescriptor = contextRuntimeDescriptor; DeploymentId = deploymentId; StatementId = statementId; StatementName = statementName; ModuleName = moduleName; StatementInformationals = statementInformationals; UserObjectRuntime = userObjectRuntime; StatementContextRuntimeServices = statementContextRuntimeServices; EpStatementHandle = epStatementHandle; FilterSpecActivatables = filterSpecActivatables; PatternSubexpressionPoolSvc = patternSubexpressionPoolSvc; RowRecogStatePoolStmtSvc = rowRecogStatePoolStmtSvc; ScheduleBucket = scheduleBucket; StatementAIResourceRegistry = statementAIResourceRegistry; StatementCPCacheService = statementCPCacheService; StatementAIFactoryProvider = statementAIFactoryProvider; StatementResultService = statementResultService; UpdateDispatchView = updateDispatchView; StatementContextFilterEvalEnv = new StatementContextFilterEvalEnv( statementContextRuntimeServices.ImportServiceRuntime, statementInformationals.Annotations, statementContextRuntimeServices.VariableManagementService, statementContextRuntimeServices.TableExprEvaluatorContext); this.FilterService = filterService; this.SchedulingService = schedulingService; this.InternalEventRouteDest = internalEventRouteDest; }
public static void Output( bool forceUpdate, UniformPair<EventBean[]> result, UpdateDispatchView finalView) { var newEvents = result != null ? result.First : null; var oldEvents = result != null ? result.Second : null; if (newEvents != null || oldEvents != null) { finalView.NewResult(result); } else if (forceUpdate) { finalView.NewResult(result); } }
private static EPStatementSPI MakeStatement( UpdateDispatchView dispatchChildView, StatementContext statementContext, StatementResultServiceImpl statementResultService, EPRuntimeSPI epRuntime) { var epStatement = epRuntime.ServicesContext.EpStatementFactory.Statement(new EPStatementFactoryArgs(statementContext, dispatchChildView, statementResultService)); var info = statementContext.StatementInformationals; statementResultService.SetSelectClause(info.SelectClauseTypes, info.SelectClauseColumnNames, info.IsForClauseDelivery, info.GroupDeliveryEval); statementResultService.SetContext(epStatement, epRuntime); return(epStatement); }
public void Output(bool forceUpdate, UniformPair <EventBean[]> result, UpdateDispatchView finalView) { var newEvents = result != null ? result.First : null; var oldEvents = result != null ? result.Second : null; // route first if (_parent.IsRoute) { if ((newEvents != null) && (_parent.InsertIntoStreamSelector.Value.IsSelectsIStream())) { Route(newEvents, _agentInstanceContext); } if ((oldEvents != null) && (_parent.InsertIntoStreamSelector.Value.IsSelectsRStream())) { Route(oldEvents, _agentInstanceContext); } } // discard one side of results if (_parent.SelectStreamDirEnum == SelectClauseStreamSelectorEnum.RSTREAM_ONLY) { newEvents = oldEvents; oldEvents = null; } else if (_parent.SelectStreamDirEnum == SelectClauseStreamSelectorEnum.ISTREAM_ONLY) { oldEvents = null; // since the insert-into may require rstream } // dispatch if (newEvents != null || oldEvents != null) { finalView.NewResult(new UniformPair <EventBean[]>(newEvents, oldEvents)); } else if (forceUpdate) { finalView.NewResult(new UniformPair <EventBean[]>(null, null)); } }
public void RemoveAllViews() { ChildView = null; }
public void RemoveAll(UpdateDispatchView updateDispatchView) { var dispatchables = dispatchStateThreadLocal.GetOrCreate(); dispatchables.RemoveWhere( dispatchable => dispatchable.View == updateDispatchView, dispatchable => dispatchable.Cancelled()); }