private void removeDestination(final Object key, final RollingDestination destination) {
        // Only remove the destination if it is the same one that is already in the map.
        currentDestinations.compute(key, (k, v) -> {
            if (v == destination) {
                return null;
            }
            return v;
        });
    }
Try and lock this destination so that the current thread has exclusive access. Once locked we will attempt to
roll this destination if it needs rolling.
<p>
If it is rolled then this method will return null as this destination can no longer be used, if the destination
does not need rolling yet then it will be returned for use.

@param key         The key that this destination is associated with.
@param destination The destination to lock and attempt to roll.
@return The destination if it didn't need rolling and can be used, null otherwise. The returned
destination is locked for exclusive use by the current thread.
@throws IOException Could be thrown while attempting to flush or close the destination on roll.
stroom-pipeline/src/main/java/stroom/pipeline/destination/RollingDestinations.java