slumberdb/slumberdb-service-model/src/main/java/org/boon/slumberdb/stores/log/BatchFileWriter.java
public boolean syncToDisk() {

        /** if we have a stream and we are dirty then flush. */
        if (outputStream != null && dirty) {

            try {
                //outputStream.flush ();

                if (outputStream instanceof FileChannel) {
                    FileChannel channel = (FileChannel) outputStream;
                    channel.force(true);
                }
                dirty = false;
                return true;
            } catch (Exception ex) {
                cleanupOutputStream();
                return false;
            }
        } else {
            return false;
        }
    }
public boolean syncToDisk() {

        /** if we have a stream and we are dirty then flush. */
        if (outputStream != null && dirty) {

            try {
                //outputStream.flush ();

                if (outputStream instanceof FileChannel) {
                    FileChannel channel = (FileChannel) outputStream;
                    channel.force(true);
                }
                dirty = false;
                return true;
            } catch (Exception ex) {
                cleanupOutputStream();
                return false;
            }
        } else {
            return false;
        }
    }
public boolean syncToDisk ( ) { /** if we have a stream and we are dirty then flush. */ if ( outputStream != null && dirty ) { try { //outputStream.flush (); if ( outputStream instanceof FileChannel ) { FileChannel channel = ( FileChannel ) outputStream ; channel . force ( true ) ; } dirty = false ; return true ; } catch ( Exception ex ) { cleanupOutputStream ( ) ; return false ; } } else { return false ; } }
flush to disk.
flush to disk .