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 Detail

      • 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
      • getExpiryPolicy

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

        The ExpiryPolicy cannot be null.

        Returns:
        the ExpiryPolicy