public CustomOptional<KinesisRecord> next() throws TransientKinesisException {
  readMoreIfNecessary();
  if (data.isEmpty()) {
    return CustomOptional.absent();
  }
 else {
    KinesisRecord record=data.removeFirst();
    checkpoint=checkpoint.moveAfter(record);
    return CustomOptional.of(record);
  }
}

public CustomOptional < KinesisRecord > next ( ) throws TransientKinesisException { readMoreIfNecessary ( ) ; if ( data . isEmpty ( ) ) { return CustomOptional . absent ( ) ; } else { KinesisRecord record = data . removeFirst ( ) ; checkpoint = checkpoint . moveAfter ( record ) ; return CustomOptional . of ( record ) ; } }
returns record if there ' s any present . returns absent ( ) if there are no new records at this time in the shard .
