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

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

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

import org.babyfish.jimmer.meta.ImmutableProp;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

class CacheAbandonedCallbackForLog implements CacheAbandonedCallback {

    static final CacheAbandonedCallbackForLog INSTANCE = new CacheAbandonedCallbackForLog();

    private static final Logger LOGGER = LoggerFactory.getLogger(CacheAbandonedCallback.class);

    @Override
    public void abandoned(ImmutableProp prop, Reason reason) {
        if (LOGGER.isWarnEnabled()) {
            LOGGER.warn("!!!Jimmer warning!!!");
            LOGGER.warn(
                    "Property-level cache is abandoned.\n" +
                            "\tProperty: " +
                            prop +
                            "\n\tReason: " +
                            reason
            );
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy