code: @Override
    public void play(SourceFactory sourceFactory, Sink<Event> sink) {
      List<List<Source>> sourceGroups = initSources(sourceFactory);
      Thread[] threads = new Thread[threadsNum];
      int i = 0;
      for (List<Source> sourceGroup : sourceGroups) {
        threads[i] = new UserGroupThread(sourceGroup, sink, timeToWork, minActionDelay, maxActionDelay);
        threads[i].start();
        i++;
      }
  
      for (Thread thread : threads) {
        try {
          thread.join();
        } catch (InterruptedException e) {
          LOG.error(e); // TODO: handle properly
        }
      }
    }
docs: (non-Javadoc)
  
  @see com.sematext.ag.Player#play(com.sematext.ag.source.SourceFactory, com.sematext.ag.sink.Sink)