Writes buffered data to the log, and optionally performs an fsync to guarantee that data is written to the physical device.
This method is used to make durable, by writing to the log, all preceding non-transactional write operations, as well as any preceding transactions that were committed with {@link Durability.SyncPolicy#NO_SYNC no-sync durability}. If the {@code fsync}parameter is true, it can also be used to flush all logged data to the physical storage device, by performing an fsync.
Note that this method does not flush previously unwritten data in deferred-write databases; that is done by calling {@link Database#sync} or performing a checkpoint.
@param fsync is true to perform an fsync as well as a file write, orfalse to perform only a file write.
@throws EnvironmentFailureException if an unexpected, internal orenvironment-wide failure occurs.
@throws IllegalStateException if this handle or the underlyingenvironment has been closed.