@Override public long flushAndSync() throws IOException {
  checkClosedOrInError("flushAndSync");
  LOG.debug("FlushAndSync Started");
  long highestTransactionId=0;
  BKLogSegmentWriter writer=getCachedLogWriter();
  if (null != writer) {
    highestTransactionId=Math.max(highestTransactionId,FutureUtils.result(writer.commit()));
    LOG.debug("FlushAndSync Completed");
  }
 else {
    LOG.debug("FlushAndSync Completed - Nothing to Flush");
  }
  return highestTransactionId;
}

@ Override public long flushAndSync ( ) throws IOException { checkClosedOrInError ( "flushAndSync" ) ; LOG . debug ( "FlushAndSync Started" ) ; long highestTransactionId = 0 ; BKLogSegmentWriter writer = getCachedLogWriter ( ) ; if ( null != writer ) { highestTransactionId = Math . max ( highestTransactionId , FutureUtils . result ( writer . commit ( ) ) ) ; LOG . debug ( "FlushAndSync Completed" ) ; } else { LOG . debug ( "FlushAndSync Completed - Nothing to Flush" ) ; } return highestTransactionId ; }
commit data that is already flushed . < p / > this api is optional as the writer implements a policy for automatically syncing the log records in the buffer . the buffered edits can be flushed when the buffer becomes full or a certain period of time is elapsed .
