Class QuarkusPersistenceUnitCaffeineCacheManager

java.lang.Object
io.quarkus.hibernate.orm.runtime.cache.QuarkusPersistenceUnitCaffeineCacheManager
All Implemented Interfaces:
Closeable, AutoCloseable, javax.cache.CacheManager

public class QuarkusPersistenceUnitCaffeineCacheManager extends Object implements javax.cache.CacheManager
A JCache CacheManager that delegates to the Caffeine implementation, but ensures all returned caches are configured with Quarkus settings.

The builder translates Quarkus cache configuration (quarkus.hibernate-orm.cache.*) into Caffeine CaffeineConfiguration instances and pre-creates caches at build time.

  • Constructor Details

  • Method Details

    • getCachingProvider

      public javax.cache.spi.CachingProvider getCachingProvider()
      Specified by:
      getCachingProvider in interface javax.cache.CacheManager
    • getURI

      public URI getURI()
      Specified by:
      getURI in interface javax.cache.CacheManager
    • getClassLoader

      public ClassLoader getClassLoader()
      Specified by:
      getClassLoader in interface javax.cache.CacheManager
    • getProperties

      public Properties getProperties()
      Specified by:
      getProperties in interface javax.cache.CacheManager
    • createCache

      public <K, V, C extends javax.cache.configuration.Configuration<K, V>> javax.cache.Cache<K,V> createCache(String cacheName, C configuration) throws IllegalArgumentException
      Specified by:
      createCache in interface javax.cache.CacheManager
      Throws:
      IllegalArgumentException
    • getCache

      public <K, V> javax.cache.Cache<K,V> getCache(String cacheName, Class<K> keyType, Class<V> valueType)
      Specified by:
      getCache in interface javax.cache.CacheManager
    • getCache

      public <K, V> javax.cache.Cache<K,V> getCache(String cacheName)
      Specified by:
      getCache in interface javax.cache.CacheManager
    • getCacheNames

      public Iterable<String> getCacheNames()
      Specified by:
      getCacheNames in interface javax.cache.CacheManager
    • destroyCache

      public void destroyCache(String cacheName)
      Specified by:
      destroyCache in interface javax.cache.CacheManager
    • enableManagement

      public void enableManagement(String cacheName, boolean enabled)
      Specified by:
      enableManagement in interface javax.cache.CacheManager
    • enableStatistics

      public void enableStatistics(String cacheName, boolean enabled)
      Specified by:
      enableStatistics in interface javax.cache.CacheManager
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface javax.cache.CacheManager
      Specified by:
      close in interface Closeable
    • isClosed

      public boolean isClosed()
      Specified by:
      isClosed in interface javax.cache.CacheManager
    • unwrap

      public <T> T unwrap(Class<T> clazz)
      Specified by:
      unwrap in interface javax.cache.CacheManager