protected final void roll() throws IOException {
        this.rolled = true;

        final Collection<Throwable> exceptions = new ArrayList<>();

        beforeRoll(exceptions::add);

        // If we have written any data then write a footer if we have one.
        if (footer != null && footer.length > 0 && output != null && output.getCurrentOutputSize() > 0) {
            // Write the footer.
            try {
                write(footer);
            } catch (final RuntimeException e) {
                exceptions.add(e);
            }
        }

        // Try and close the output stream.
        try {
            close();
        } catch (final RuntimeException e) {
            exceptions.add(e);
        }

        afterRoll(exceptions::add);

        throwFirstAsIOExceptions(exceptions);
    }
Try to flush this destination if it needs to and roll it if it needs to.
If this destination is rolled then this method will return true.

@return True if this destination has been rolled.
stroom-pipeline/src/main/java/stroom/pipeline/destination/RollingDestination.java