private HasCapacitySelector getVolumeSelector() {
        String requiredSelectorName = null;

        try {
            requiredSelectorName = volumeConfigProvider.get().getVolumeSelector();
        } catch (final RuntimeException e) {
            LOGGER.debug(e::getMessage);
        }

        final HasCapacitySelector currentSelector = volumeSelector.get();
        if (currentSelector != null
            && requiredSelectorName != null
            && currentSelector.getName().equals(requiredSelectorName)) {
            return currentSelector;
        } else {
            final String requiredSelectorNameCopy = requiredSelectorName;
            // Atomically update the selector reference to the new one
            return volumeSelector.accumulateAndGet(
                    null,
                    (curr, next) -> {
                        if (curr == null
                            || requiredSelectorNameCopy == null
                            || !curr.getName().equals(requiredSelectorNameCopy)) {
                            return hasCapacitySelectorFactory.createSelectorOrDefault(
                                    requiredSelectorNameCopy);
                        } else {
                            // Existing one is ok, maybe another thread did it
                            return curr;
                        }
                    });
        }
    }
@return An active and non-full volume selected by the configured volume selector
stroom-data/stroom-data-store-impl-fs/src/main/java/stroom/data/store/impl/fs/FsVolumeService.java