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

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

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

import java.util.Collection;
import java.util.Collections;
import java.util.Map;

public interface Cache {
    
    default V get(K key, QueryCacheEnvironment env) {
        Map map = getAll(Collections.singleton(key), env);
        return map.get(key);
    }

    Map getAll(Collection keys, QueryCacheEnvironment env);

    default void delete(K key, CacheEnvironment env) {
        deleteAll(Collections.singleton(key), env);
    }

    void deleteAll(Collection keys, CacheEnvironment env);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy