Interface CacheCallback<T>

  • Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface CacheCallback<T>
    Обработка событий при работе с кешем
    • Method Detail

      • doInCacheMiss

        T doInCacheMiss()
        Получить объект из источника, при отсутствии его в кеше
        Returns:
        объект для кеша
      • doInCacheHit

        default void doInCacheHit​(T t)
        Сделать что-то после получения объекта из кеша
        Parameters:
        t - объект из кеша