slumberdb/slumberdb-service-model/src/main/java/org/boon/slumberdb/stores/log/BatchFileWriter.java
private void initOutputStream() {

        long time = this.time.get();


        if (error.get() || this.totalBytesTransferred == 0) {
            cleanupOutputStream();
            error.set(false);
            time = System.nanoTime() / 1_000_000;
        }

        if (outputStream != null) {
            return;
        }

        fileName = LogFilesConfig.getLogFileName(FORMAT_PATTERN, outputDirPath(), numFiles, time, SERVER_NAME);
        try {
            fileTimeOut.set(false);
            outputStream = streamCreator();

            fileStartTime.set(time);


            bytesTransferred = 0;
            bytesSinceLastFlush = 0;


        } catch (Exception ex) {
            cleanupOutputStream();
            error.set(true);
            Exceptions.handle(ex);
        } finally {
            numFiles++;
        }
    }
private void initOutputStream() {

        long time = this.time.get();


        if (error.get() || this.totalBytesTransferred == 0) {
            cleanupOutputStream();
            error.set(false);
            time = System.nanoTime() / 1_000_000;
        }

        if (outputStream != null) {
            return;
        }

        fileName = LogFilesConfig.getLogFileName(FORMAT_PATTERN, outputDirPath(), numFiles, time, SERVER_NAME);
        try {
            fileTimeOut.set(false);
            outputStream = streamCreator();

            fileStartTime.set(time);


            bytesTransferred = 0;
            bytesSinceLastFlush = 0;


        } catch (Exception ex) {
            cleanupOutputStream();
            error.set(true);
            Exceptions.handle(ex);
        } finally {
            numFiles++;
        }
    }
private void initOutputStream ( ) { long time = this . time . get ( ) ; if ( error . get ( ) || this . totalBytesTransferred == 0 ) { cleanupOutputStream ( ) ; error . set ( false ) ; time = System . nanoTime ( ) / 1_000_000 ; } if ( outputStream != null ) { return ; } fileName = LogFilesConfig . getLogFileName ( FORMAT_PATTERN , outputDirPath ( ) , numFiles , time , SERVER_NAME ) ; try { fileTimeOut . set ( false ) ; outputStream = streamCreator ( ) ; fileStartTime . set ( time ) ; bytesTransferred = 0 ; bytesSinceLastFlush = 0 ; } catch ( Exception ex ) { cleanupOutputStream ( ) ; error . set ( true ) ; Exceptions . handle ( ex ) ; } finally { numFiles ++ ; } }
Initialize the output stream.
Initialize the output stream .