public void operateListeners(StreamingContainerContext ctx, boolean setup) { if (setup) { for (Component<ContainerContext> c : components) { c.setup(ctx); } } else { for (Component<ContainerContext> c : components) { c.teardown(); } } }
@Override @SuppressWarnings("unchecked") public void setup(Context.OperatorContext context) { this.timeIncrement = context.getValue(Context.OperatorContext.APPLICATION_WINDOW_COUNT) * context.getValue(Context.DAGContext.STREAMING_WINDOW_SIZE_MILLIS); validate(); windowStateMap.setup(context); dataStorage.setup(context); if (retractionStorage != null) { retractionStorage.setup(context); } if (implicitWatermarkGenerator != null) { implicitWatermarkGenerator.setup(context); } for (Component component : components.values()) { component.setup(context); } if (this.windowOption instanceof WindowOption.GlobalWindow) { windowStateMap.put(Window.GlobalWindow.INSTANCE, new WindowState()); } }