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

com.turbospaces.ebean.CacheManager Maven / Gradle / Ivy

There is a newer version: 2.0.33
Show newest version
package com.turbospaces.ebean;

import org.springframework.beans.factory.DisposableBean;

import com.google.common.annotations.VisibleForTesting;

import io.ebean.BackgroundExecutor;
import io.ebean.cache.ServerCache;
import io.ebean.cache.ServerCacheFactory;
import io.ebean.cache.ServerCachePlugin;

public interface CacheManager extends ServerCachePlugin, ServerCacheFactory, DisposableBean {
    void setBackgroundExecutor(BackgroundExecutor executor);

    @VisibleForTesting
    ServerCache getCache(String string);

    void clearAll();

    default void onCachePut(String cacheKey, byte[] id, byte[] data) throws Throwable {}
    default void onCachePutAll(String cacheKey, byte[] data) throws Throwable {}
    default void onCacheRemove(String cacheKey, byte[] id) throws Throwable {}
    default void onCacheRemoveAll(String cacheKey, byte[] data) throws Throwable {}
    default void onCacheClear(String cacheKey) throws Throwable {}
    default void onTablesModify(String tables) throws Throwable {}

    @Deprecated
    default void onCacheClearAll(boolean preserveSimple) throws Throwable {}
    default void onCacheClearAll() throws Throwable {
        onCacheClearAll(true);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy