/** * Ctor. * @param eventType the event type of the named window * @param statementStopService for registering a callback when the view stopped, to unregister the statement as a consumer * @param tailView to indicate when the consumer stopped to remove the consumer * @param filterList is a list of filter expressions */ public NamedWindowConsumerView(List<ExprNode> filterList, EventType eventType, StatementStopService statementStopService, NamedWindowTailView tailView) { this.filterList = filterList; this.eventType = eventType; this.tailView = tailView; statementStopService.addSubscriber(this); }
public void stop() { statementContext.getStatementStopService().fireStatementStopped(); if (streamSpec instanceof FilterStreamSpecCompiled) { FilterStreamSpecCompiled filterStreamSpec = (FilterStreamSpecCompiled) streamSpec; services.getStreamService().dropStream(filterStreamSpec.getFilterSpec(), services.getFilterService(), false); } for (StopCallback stopCallback : stopCallbacks) { stopCallback.stop(); } } };
public void stop() { statementContext.getStatementStopService().fireStatementStopped(); services.getStreamService().dropStream(filterStreamSpec.getFilterSpec(), services.getFilterService(), false); String windowName = statementSpec.getCreateWindowDesc().getWindowName(); services.getNamedWindowService().removeProcessor(windowName); } };
/** * Ctor. * @param statementStopService for indicating a statement was stopped or destroyed for cleanup * @param lookupStrategy for handling trigger events to determine deleted events * @param rootView to indicate which events to delete */ public NamedWindowOnExprBaseView(StatementStopService statementStopService, LookupStrategy lookupStrategy, NamedWindowRootView rootView) { this.lookupStrategy = lookupStrategy; this.rootView = rootView; statementStopService.addSubscriber(this); namedWindowEventType = rootView.getEventType(); }
public void stop() { statementContext.getStatementStopService().fireStatementStopped(); for (StreamSpecCompiled streamSpec : statementStreamSpecs) { if (streamSpec instanceof FilterStreamSpecCompiled) { FilterStreamSpecCompiled filterStreamSpec = (FilterStreamSpecCompiled) streamSpec; services.getStreamService().dropStream(filterStreamSpec.getFilterSpec(), services.getFilterService(), isJoin); } } for (StopCallback stopCallback : stopCallbacks) { stopCallback.stop(); } for (ExprSubselectNode subselect : statementSpec.getSubSelectExpressions()) { StreamSpecCompiled subqueryStreamSpec = subselect.getStatementSpecCompiled().getStreamSpecs().get(0); if (subqueryStreamSpec instanceof FilterStreamSpecCompiled) { FilterStreamSpecCompiled filterStreamSpec = (FilterStreamSpecCompiled) subselect.getStatementSpecCompiled().getStreamSpecs().get(0); services.getStreamService().dropStream(filterStreamSpec.getFilterSpec(), services.getFilterService(), isJoin); } } } };
/** * Ctor. * @param revisionEventTypeAlias alias * @param spec specification * @param statementStopService for stop handling * @param eventAdapterService for nested property handling */ public VAERevisionProcessorDeclared(String revisionEventTypeAlias, RevisionSpec spec, StatementStopService statementStopService, EventAdapterService eventAdapterService) { super(spec, revisionEventTypeAlias, eventAdapterService); // on statement stop, remove versions statementStopService.addSubscriber(new StatementStopCallback() { public void statementStopped() { statePerKey.clear(); } }); this.statePerKey = new HashMap<MultiKeyUntyped, RevisionStateDeclared>(); this.baseEventType = spec.getBaseEventType(); this.fullKeyGetters = PropertyUtility.getGetters(baseEventType, spec.getKeyPropertyNames()); // sort non-key properties, removing keys groups = PropertyUtility.analyzeGroups(spec.getChangesetPropertyNames(), spec.getDeltaTypes(), spec.getDeltaAliases()); Map<String, RevisionPropertyTypeDesc> propertyDesc = createPropertyDescriptors(spec, groups); typeDescriptors = PropertyUtility.getPerType(groups, spec.getChangesetPropertyNames(), spec.getKeyPropertyNames()); revisionEventType = new RevisionEventType(propertyDesc, eventAdapterService); }
statementStopService.addSubscriber(new StatementStopCallback() { public void statementStopped()