optaplanner-core/src/main/java/org/optaplanner/core/impl/domain/common/ConcurrentMemoization.java
@Override
    public V computeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction) {
        // This might look like a Double Checked Idiom (which is broken), but it is not
        // because value is not a global variable
        V value = get(key);
        if (value != null) {
            return value;
        }
        return super.computeIfAbsent(key, mappingFunction);
    }
@Override
    public V computeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction) {
        // This might look like a Double Checked Idiom (which is broken), but it is not
        // because value is not a global variable
        V value = get(key);
        if (value != null) {
            return value;
        }
        return super.computeIfAbsent(key, mappingFunction);
    }
An overridden implementation that heavily favors read access over write access speed.
This is thread-safe.

{@inheritDoc}