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 .