org.ehcache.config
Interface CacheConfiguration<K,V>

Type Parameters:
K - the type of the keys used to access data within the cache
V - the type of the values held within the cache
All Known Subinterfaces:
CacheRuntimeConfiguration<K,V>
All Known Implementing Classes:
BaseCacheConfiguration

public interface CacheConfiguration<K,V>

Represents the minimal read-only configuration for a Cache to be, or an already existing one


Method Summary
 java.lang.ClassLoader getClassLoader()
          The ClassLoader for this cache.
 EvictionPrioritizer<? super K,? super V> getEvictionPrioritizer()
          The EvictionPrioritizer comparator.
 EvictionVeto<? super K,? super V> getEvictionVeto()
          The EvictionVeto predicate function.
 Expiry<? super K,? super V> getExpiry()
          Get the expiration policy instance for the Cache.
 java.lang.Class<K> getKeyType()
          The type of the key for the cache.
 ResourcePools getResourcePools()
          Get the resource pools the Cache can make use of.
 java.util.Collection<ServiceConfiguration<?>> getServiceConfigurations()
          Not sure whether this should be exposed on this interface really.
 java.lang.Class<V> getValueType()
          The type of the value held in the cache.
 

Method Detail

getServiceConfigurations

java.util.Collection<ServiceConfiguration<?>> getServiceConfigurations()
Not sure whether this should be exposed on this interface really.

Returns:
unmodifiable collection of service configuration related to the cache

getKeyType

java.lang.Class<K> getKeyType()
The type of the key for the cache.

Returns:
a non null value, where Object.class is the widest type

getValueType

java.lang.Class<V> getValueType()
The type of the value held in the cache.

Returns:
a non null value, where Object.class is the widest type

getEvictionVeto

EvictionVeto<? super K,? super V> getEvictionVeto()
The EvictionVeto predicate function.

Entries which pass this predicate must be ignored by the eviction process.

Returns:
the eviction veto predicate

getEvictionPrioritizer

EvictionPrioritizer<? super K,? super V> getEvictionPrioritizer()
The EvictionPrioritizer comparator.

This comparator function determines the order in which entries are considered for eviction.

Returns:
the eviction prioritizer

getClassLoader

java.lang.ClassLoader getClassLoader()
The ClassLoader for this cache. This ClassLoader will be used to instantiate cache level services as well as deserializing cache entries when required.

Returns:
the cache ClassLoader

getExpiry

Expiry<? super K,? super V> getExpiry()
Get the expiration policy instance for the Cache.

Returns:
the Expiry to configure

getResourcePools

ResourcePools getResourcePools()
Get the resource pools the Cache can make use of.

Returns:
the ResourcePools