org.ehcache.config
Class BaseCacheConfiguration<K,V>

java.lang.Object
  extended by org.ehcache.config.BaseCacheConfiguration<K,V>
All Implemented Interfaces:
CacheConfiguration<K,V>

public class BaseCacheConfiguration<K,V>
extends java.lang.Object
implements CacheConfiguration<K,V>


Constructor Summary
BaseCacheConfiguration(java.lang.Class<K> keyType, java.lang.Class<V> valueType, EvictionVeto<? super K,? super V> evictionVeto, EvictionPrioritizer<? super K,? super V> evictionPrioritizer, java.lang.ClassLoader classLoader, Expiry<? super K,? super V> expiry, ResourcePools resourcePools, ServiceConfiguration<?>... serviceConfigurations)
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseCacheConfiguration

public BaseCacheConfiguration(java.lang.Class<K> keyType,
                              java.lang.Class<V> valueType,
                              EvictionVeto<? super K,? super V> evictionVeto,
                              EvictionPrioritizer<? super K,? super V> evictionPrioritizer,
                              java.lang.ClassLoader classLoader,
                              Expiry<? super K,? super V> expiry,
                              ResourcePools resourcePools,
                              ServiceConfiguration<?>... serviceConfigurations)
Method Detail

getServiceConfigurations

public java.util.Collection<ServiceConfiguration<?>> getServiceConfigurations()
Description copied from interface: CacheConfiguration
Not sure whether this should be exposed on this interface really.

Specified by:
getServiceConfigurations in interface CacheConfiguration<K,V>
Returns:
unmodifiable collection of service configuration related to the cache

getKeyType

public java.lang.Class<K> getKeyType()
Description copied from interface: CacheConfiguration
The type of the key for the cache.

Specified by:
getKeyType in interface CacheConfiguration<K,V>
Returns:
a non null value, where Object.class is the widest type

getValueType

public java.lang.Class<V> getValueType()
Description copied from interface: CacheConfiguration
The type of the value held in the cache.

Specified by:
getValueType in interface CacheConfiguration<K,V>
Returns:
a non null value, where Object.class is the widest type

getEvictionVeto

public EvictionVeto<? super K,? super V> getEvictionVeto()
Description copied from interface: CacheConfiguration
The EvictionVeto predicate function.

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

Specified by:
getEvictionVeto in interface CacheConfiguration<K,V>
Returns:
the eviction veto predicate

getEvictionPrioritizer

public EvictionPrioritizer<? super K,? super V> getEvictionPrioritizer()
Description copied from interface: CacheConfiguration
The EvictionPrioritizer comparator.

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

Specified by:
getEvictionPrioritizer in interface CacheConfiguration<K,V>
Returns:
the eviction prioritizer

getClassLoader

public java.lang.ClassLoader getClassLoader()
Description copied from interface: CacheConfiguration
The ClassLoader for this cache. This ClassLoader will be used to instantiate cache level services as well as deserializing cache entries when required.

Specified by:
getClassLoader in interface CacheConfiguration<K,V>
Returns:
the cache ClassLoader

getExpiry

public Expiry<? super K,? super V> getExpiry()
Description copied from interface: CacheConfiguration
Get the expiration policy instance for the Cache.

Specified by:
getExpiry in interface CacheConfiguration<K,V>
Returns:
the Expiry to configure

getResourcePools

public ResourcePools getResourcePools()
Description copied from interface: CacheConfiguration
Get the resource pools the Cache can make use of.

Specified by:
getResourcePools in interface CacheConfiguration<K,V>
Returns:
the ResourcePools