Beispiel #1
0
        private void AddStatement(EPStatement stmt)
        {
            // statement may be added already
            if (listeners.ContainsKey(stmt))
            {
                return;
            }

            // attach listener
            UpdateListener listener;
            if (collector == null)
            {
                listener = new EmitterUpdateListener(emittables, factory.IsSubmitEventBean);
            }
            else
            {
                var emitterForCollector = new LocalEmitter(emittables);
                listener = new EmitterCollectorUpdateListener(collector, emitterForCollector, factory.IsSubmitEventBean);
            }
            stmt.AddListener(listener);

            // save listener instance
            listeners.Put(stmt, listener);
        }
Beispiel #2
0
 public EmitterCollectorUpdateListener(EPDataFlowIRStreamCollector collector, LocalEmitter emitterForCollector, bool submitEventBean)
 {
     this.collector = collector;
     this.emitterForCollector = emitterForCollector;
     this.submitEventBean = submitEventBean;
 }