예제 #1
0
 private MessageBatcher MakeBatcher()
 {
     lock (this)
     {
         if (_batcher == null)
         {
             _timer   = new AggregatorTimeSignalGenerator(this, _batchInterval);
             _batcher = new MessageBatcher();
         }
     }
     return(_batcher);
 }
예제 #2
0
 public BatchingListenerContainer(object listener, MessageBatcher batcher)
 {
     _batcher           = batcher;
     _listener          = new WeakReference(listener as IListener <T>);
     _listenerContainer = new ListenerContainer <T>(listener);
 }