Class Eh107Configuration<K,V>

java.lang.Object
org.ehcache.jsr107.Eh107Configuration<K,V>
Type Parameters:
K - the key type
V - the value type
All Implemented Interfaces:
Serializable, javax.cache.configuration.Configuration<K,V>

public abstract class Eh107Configuration<K,V> extends Object implements javax.cache.configuration.Configuration<K,V>
Abstract Configuration implementation that enables building a JSR-107 compatible configuration from a native Ehcache CacheConfiguration.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <K, V> javax.cache.configuration.Configuration<K,V>
    fromEhcacheCacheConfiguration(org.ehcache.config.Builder<? extends org.ehcache.config.CacheConfiguration<K,V>> ehcacheConfigBuilder)
    Creates a new JSR-107 Configuration from the provided CacheConfiguration obtained through a Builder.
    static <K, V> javax.cache.configuration.Configuration<K,V>
    fromEhcacheCacheConfiguration(org.ehcache.config.CacheConfiguration<K,V> ehcacheConfig)
    Creates a new JSR-107 Configuration from the provided CacheConfiguration.
    abstract <T> T
    unwrap(Class<T> clazz)
    Enables to unwrap the underlying configuration.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface javax.cache.configuration.Configuration

    getKeyType, getValueType, isStoreByValue
  • Constructor Details

    • Eh107Configuration

      public Eh107Configuration()
  • Method Details

    • fromEhcacheCacheConfiguration

      public static <K, V> javax.cache.configuration.Configuration<K,V> fromEhcacheCacheConfiguration(org.ehcache.config.CacheConfiguration<K,V> ehcacheConfig)
      Creates a new JSR-107 Configuration from the provided CacheConfiguration.
      Type Parameters:
      K - the key type
      V - the value type
      Parameters:
      ehcacheConfig - the native Ehcache configuration
      Returns:
      a JSR-107 configuration
    • fromEhcacheCacheConfiguration

      public static <K, V> javax.cache.configuration.Configuration<K,V> fromEhcacheCacheConfiguration(org.ehcache.config.Builder<? extends org.ehcache.config.CacheConfiguration<K,V>> ehcacheConfigBuilder)
      Creates a new JSR-107 Configuration from the provided CacheConfiguration obtained through a Builder.
      Type Parameters:
      K - the key type
      V - the value type
      Parameters:
      ehcacheConfigBuilder - the native Ehcache configuration through a builder
      Returns:
      a JSR-107 configuration
    • unwrap

      public abstract <T> T unwrap(Class<T> clazz)
      Enables to unwrap the underlying configuration.
      Type Parameters:
      T - the unwrap target type
      Parameters:
      clazz - the unwrap target class
      Returns:
      unwrapped type
      Throws:
      IllegalArgumentException - if the type cannot be unwrapped in the target type