mysql-binlog-lib/src/main/java/com/streamsets/pipeline/stage/origin/mysql/EventBuffer.java
public EnrichedEvent poll(long timeout, TimeUnit unit) throws StageException {
    try {
      return queue.poll(timeout, unit);
    } catch (InterruptedException e) {
      LOG.error(Errors.MYSQL_001.getMessage(), e.toString(), e);
      Thread.currentThread().interrupt();
      throw new StageException(Errors.MYSQL_001, e.toString(), e);
    }
  }
public EnrichedEvent poll(long timeout, TimeUnit unit) throws StageException {
    try {
      return queue.poll(timeout, unit);
    } catch (InterruptedException e) {
      LOG.error(Errors.MYSQL_001.getMessage(), e.toString(), e);
      Thread.currentThread().interrupt();
      throw new StageException(Errors.MYSQL_001, e.toString(), e);
    }
  }
Read next event from buffer with respect to maximum timeout.
@param timeout timeout.
@param unit timeout time unit.
@return next event of null
@throws StageException