org.ehcache.core.config.store
Class StoreConfigurationImpl<K,V>

java.lang.Object
  extended by org.ehcache.core.config.store.StoreConfigurationImpl<K,V>
All Implemented Interfaces:
Store.Configuration<K,V>

public class StoreConfigurationImpl<K,V>
extends java.lang.Object
implements Store.Configuration<K,V>

Implementation class of the Store.Configuration as used by EhcacheManager in order to prepare Store creation.


Constructor Summary
StoreConfigurationImpl(CacheConfiguration<K,V> cacheConfig, int orderedEventParallelism, Serializer<K> keySerializer, Serializer<V> valueSerializer)
          Creates a new StoreConfigurationImpl based on the provided parameters.
StoreConfigurationImpl(java.lang.Class<K> keyType, java.lang.Class<V> valueType, EvictionVeto<? super K,? super V> evictionVeto, java.lang.ClassLoader classLoader, Expiry<? super K,? super V> expiry, ResourcePools resourcePools, int orderedEventParallelism, Serializer<K> keySerializer, Serializer<V> valueSerializer)
          Creates a new StoreConfigurationImpl based on the provided parameters.
 
Method Summary
 java.lang.ClassLoader getClassLoader()
          The Classloader for this store.
 EvictionVeto<? super K,? super V> getEvictionVeto()
          A predicate function that, if it passes an entry, must prevent that entry from being evicted by the store.
 Expiry<? super K,? super V> getExpiry()
          The expiration policy instance for this store
 Serializer<K> getKeySerializer()
          The serializer for key instances
 java.lang.Class<K> getKeyType()
          The type of the keys that a Store will hold.
 int getOrderedEventParallelism()
          The number of parallel queues used when doing ordered events
 ResourcePools getResourcePools()
          The resource pools this store can make use of
 Serializer<V> getValueSerializer()
          The serializer for value instances
 java.lang.Class<V> getValueType()
          The type of the values that a Store will hold.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StoreConfigurationImpl

public StoreConfigurationImpl(CacheConfiguration<K,V> cacheConfig,
                              int orderedEventParallelism,
                              Serializer<K> keySerializer,
                              Serializer<V> valueSerializer)
Creates a new StoreConfigurationImpl based on the provided parameters.

Parameters:
cacheConfig - the cache configuration
orderedEventParallelism - the level of parallelism for ordered events
keySerializer - the key serializer
valueSerializer - the value serializer

StoreConfigurationImpl

public StoreConfigurationImpl(java.lang.Class<K> keyType,
                              java.lang.Class<V> valueType,
                              EvictionVeto<? super K,? super V> evictionVeto,
                              java.lang.ClassLoader classLoader,
                              Expiry<? super K,? super V> expiry,
                              ResourcePools resourcePools,
                              int orderedEventParallelism,
                              Serializer<K> keySerializer,
                              Serializer<V> valueSerializer)
Creates a new StoreConfigurationImpl based on the provided parameters.

Parameters:
keyType - the key type
valueType - the value type
evictionVeto - the eviction veto
classLoader - the class loader
expiry - the expiry policy
resourcePools - the resource pools
orderedEventParallelism - the level or parallelism for ordered events
keySerializer - the key serializer
valueSerializer - the value serializer
Method Detail

getKeyType

public java.lang.Class<K> getKeyType()
The type of the keys that a Store will hold.

Specified by:
getKeyType in interface Store.Configuration<K,V>
Returns:
the key type

getValueType

public java.lang.Class<V> getValueType()
The type of the values that a Store will hold.

Specified by:
getValueType in interface Store.Configuration<K,V>
Returns:
the value type

getEvictionVeto

public EvictionVeto<? super K,? super V> getEvictionVeto()
A predicate function that, if it passes an entry, must prevent that entry from being evicted by the store.

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

getClassLoader

public java.lang.ClassLoader getClassLoader()
The Classloader for this store. This classloader will be used to deserialize cache entries when required

Specified by:
getClassLoader in interface Store.Configuration<K,V>

getExpiry

public Expiry<? super K,? super V> getExpiry()
The expiration policy instance for this store

Specified by:
getExpiry in interface Store.Configuration<K,V>

getResourcePools

public ResourcePools getResourcePools()
The resource pools this store can make use of

Specified by:
getResourcePools in interface Store.Configuration<K,V>

getKeySerializer

public Serializer<K> getKeySerializer()
The serializer for key instances

Specified by:
getKeySerializer in interface Store.Configuration<K,V>

getValueSerializer

public Serializer<V> getValueSerializer()
The serializer for value instances

Specified by:
getValueSerializer in interface Store.Configuration<K,V>

getOrderedEventParallelism

public int getOrderedEventParallelism()
The number of parallel queues used when doing ordered events

Specified by:
getOrderedEventParallelism in interface Store.Configuration<K,V>