private void emitElement(SourceContext<WindowedValue<OutputT>> ctx,BoundedSource.BoundedReader<OutputT> reader){
synchronized (ctx.getCheckpointLock()) {
    OutputT item=reader.getCurrent();
    Instant timestamp=reader.getCurrentTimestamp();
    WindowedValue<OutputT> windowedValue=WindowedValue.of(item,timestamp,GlobalWindow.INSTANCE,PaneInfo.NO_FIRING);
    ctx.collectWithTimestamp(windowedValue,timestamp.getMillis());
  }
}

private void emitElement ( SourceContext < WindowedValue < OutputT > > ctx , BoundedSource . BoundedReader < OutputT > reader ) { synchronized ( ctx . getCheckpointLock ( ) ) { OutputT item = reader . getCurrent ( ) ; Instant timestamp = reader . getCurrentTimestamp ( ) ; WindowedValue < OutputT > windowedValue = WindowedValue . of ( item , timestamp , GlobalWindow . INSTANCE , PaneInfo . NO_FIRING ) ; ctx . collectWithTimestamp ( windowedValue , timestamp . getMillis ( ) ) ; } }
emit the current element from the given reader . the reader is guaranteed to have data .
