boolean tryFlushAndRoll(final boolean force, final Instant currentTime) throws IOException {
        final Collection<Throwable> exceptions = new ArrayList<>();

        try {
            if (!rolled) {
                // Flush the output if we need to.
                if (force || shouldFlush(currentTime)) {
                    try {
                        flush();
                    } catch (final RuntimeException e) {
                        exceptions.add(e);
                    }
                }

                // Roll the output if we need to.
                if (force || shouldRoll(currentTime)) {
                    try {
                        roll();
                    } catch (final RuntimeException e) {
                        exceptions.add(e);
                    }
                }
            }
        } catch (final RuntimeException e) {
            exceptions.add(e);
        }

        throwFirstAsIOExceptions(exceptions);

        return rolled;
    }
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