public void addEventToReportingQueue(GobblinTrackingEvent event) {
    if (this.reportingQueue.size() > QUEUE_CAPACITY * 2 / 3) {
      immediatelyScheduleReport();
    }
    try {
      if (!this.reportingQueue.offer(sanitizeEvent(event), 10, TimeUnit.SECONDS)) {
        log.error("Enqueuing of event {} at reporter with class {} timed out. Sending of events is probably stuck.",
            event, this.getClass().getCanonicalName());
      }
    } catch (InterruptedException ie) {
      log.warn("Enqueuing of event {} at reporter with class {} was interrupted.", event,
          this.getClass().getCanonicalName(), ie);
    }
  }
public void addEventToReportingQueue ( GobblinTrackingEvent event ) { if ( this . reportingQueue . size ( ) > QUEUE_CAPACITY * 2 / 3 ) { immediatelyScheduleReport ( ) ; } try { if ( ! this . reportingQueue . offer ( sanitizeEvent ( event ) , 10 , TimeUnit . SECONDS ) ) { log . error ( "Enqueuing of event {} at reporter with class {} timed out. Sending of events is probably stuck." , event , this . getClass ( ) . getCanonicalName ( ) ) ; } } catch ( InterruptedException ie ) { log . warn ( "Enqueuing of event {} at reporter with class {} was interrupted." , event , this . getClass ( ) . getCanonicalName ( ) , ie ) ; } }
Add {@link org.apache.gobblin.metrics.GobblinTrackingEvent} to the events queue.
@param event {@link org.apache.gobblin.metrics.GobblinTrackingEvent} to add to queue.