Ejemplo n.º 1
0
 public bool Call()
 {
     try
     {
         while ((_events.MoveNext() && (!_isShutdown)))
         {
             lock (_sendLock) {
                 Monitor.Wait(_sendLock);
             }
             ThreadLogUtil.Info("sending event");
             _engine.EPRuntime.SendEvent(_events.Current);
         }
     }
     catch (Exception ex)
     {
         Log.Fatal("Error in thread " + _threadNum, ex);
         return(false);
     }
     return(true);
 }
Ejemplo n.º 2
0
        public object Call()
        {
            try {
                while (events.MoveNext() && !isShutdown) {
                    lock (sendLock) {
                        Monitor.Wait(sendLock);
                    }

                    ThreadLogUtil.Info("sending event");
                    var @event = events.Current;
                    runtime.EventService.SendEventBean(@event, @event.GetType().Name);
                }
            }
            catch (Exception ex) {
                Console.WriteLine("Error in thread " + threadNum, ex);
                return false;
            }

            return true;
        }