All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.babyfish.jimmer.sql.cache.ParameterizedUsedCacheImpl Maven / Gradle / Ivy

There is a newer version: 0.9.19
Show newest version
package org.babyfish.jimmer.sql.cache;

import org.jetbrains.annotations.NotNull;

import java.util.Collection;
import java.util.Map;
import java.util.SortedMap;

class ParameterizedUsedCacheImpl extends UsedCacheImpl implements Cache.Parameterized {

    public ParameterizedUsedCacheImpl(Cache.Parameterized raw, CacheOperator operator) {
        super(raw, operator);
    }

    @Override
    public @NotNull Map getAll(
            @NotNull Collection keys,
            @NotNull SortedMap parameterMap,
            @NotNull CacheEnvironment env
    ) {
        return loading(() -> {
            Map valueMap = ((Cache.Parameterized)raw).getAll(keys, parameterMap, env);
            for (V value : valueMap.values()) {
                validateResult(value);
            }
            return valueMap;
        });
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy