Interface CacheConfiguration<K,V>

Type Parameters:
K - the key type for the cache
V - the value type for the cache
All Known Subinterfaces:
CacheRuntimeConfiguration<K,V>

public interface CacheConfiguration<K,V>
Represents the minimal configuration for a Cache.

Implementations are expected to be read-only.

  • Method Details

    • getServiceConfigurations

      Collection<ServiceConfiguration<?,?>> getServiceConfigurations()
      The service configurations defined for the Cache.

      Implementations must return an unmodifiable collection.

      Returns:
      service configurations
    • getKeyType

      Class<K> getKeyType()
      The key type for the Cache.

      The key type must not be null.

      Returns:
      a non null class
    • getValueType

      Class<V> getValueType()
      The value type for the Cache.

      The value type must not be null.

      Returns:
      a non null class
    • getEvictionAdvisor

      EvictionAdvisor<? super K,? super V> getEvictionAdvisor()
      The EvictionAdvisor predicate function.

      Entries which pass this predicate may be ignored by the eviction process. This is only a hint.

      Returns:
      the eviction advisor predicate
    • getClassLoader

      ClassLoader getClassLoader()
      The ClassLoader for the Cache.

      This ClassLoader will be used to instantiate cache level services and for deserializing cache entries when required.

      The ClassLoader must not be null.

      Returns:
      the cache ClassLoader
    • getExpiry

      @Deprecated Expiry<? super K,? super V> getExpiry()
      Deprecated.
      The Expiry rules for the Cache.

      The Expiry cannot be null.

      Returns:
      the Expiry
    • getExpiryPolicy

      ExpiryPolicy<? super K,? super V> getExpiryPolicy()
      The ExpiryPolicy rules for the Cache.

      The ExpiryPolicy cannot be null.

      Returns:
      the ExpiryPolicy
    • getResourcePools

      ResourcePools getResourcePools()
      The ResourcePools for the Cache.

      The ResourcePools cannot be null nor empty.

      Returns:
      the ResourcePools
    • derive

      Create a builder seeded with this configuration.

      The default implementation throws UnsupportedOperationException to indicate that configuration derivation is not supported.

      Returns:
      a configuration builder
      Throws:
      UnsupportedOperationException - if configuration derivation is not supported
      See Also: