private void updateAsync() {
        if (refreshing.compareAndSet(false, true)) {
            executor.execute(() -> {
                try {
                    object = update();
                } finally {
                    refreshing.set(false);
                }
            });
        }
    }
This class provides an object and updates the object asynchronously in the background periodically.
stroom-util/src/main/java/stroom/util/concurrent/AsyncReference.java