org.ehcache.impl.internal.classes
Class ClassInstanceProvider<K,T>

java.lang.Object
  extended by org.ehcache.impl.internal.classes.ClassInstanceProvider<K,T>
Direct Known Subclasses:
DefaultCacheEventListenerProvider, DefaultCacheLoaderWriterProvider, DefaultCopyProvider

public class ClassInstanceProvider<K,T>
extends java.lang.Object


Field Summary
protected  java.util.Map<K,ClassInstanceConfiguration<T>> preconfigured
          The order in which entries are put in is kept.
protected  ConcurrentWeakIdentityHashMap<T,java.util.concurrent.atomic.AtomicInteger> providedVsCount
          Instances provided by this provider vs their counts.
 
Constructor Summary
protected ClassInstanceProvider(ClassInstanceProviderConfiguration<K,T> factoryConfig, java.lang.Class<? extends ClassInstanceConfiguration<T>> cacheLevelConfig)
           
protected ClassInstanceProvider(ClassInstanceProviderConfiguration<K,T> factoryConfig, java.lang.Class<? extends ClassInstanceConfiguration<T>> cacheLevelConfig, boolean uniqueClassLevelConfig)
           
 
Method Summary
protected  ClassInstanceConfiguration<T> getPreconfigured(K alias)
           
protected  T newInstance(K alias, CacheConfiguration<?,?> cacheConfiguration)
           
protected  T newInstance(K alias, ServiceConfiguration<?> serviceConfiguration)
           
protected  void releaseInstance(T instance)
           
 void start(ServiceProvider serviceProvider)
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

preconfigured

protected final java.util.Map<K,ClassInstanceConfiguration<T>> preconfigured
The order in which entries are put in is kept.


providedVsCount

protected final ConcurrentWeakIdentityHashMap<T,java.util.concurrent.atomic.AtomicInteger> providedVsCount
Instances provided by this provider vs their counts.

Constructor Detail

ClassInstanceProvider

protected ClassInstanceProvider(ClassInstanceProviderConfiguration<K,T> factoryConfig,
                                java.lang.Class<? extends ClassInstanceConfiguration<T>> cacheLevelConfig)

ClassInstanceProvider

protected ClassInstanceProvider(ClassInstanceProviderConfiguration<K,T> factoryConfig,
                                java.lang.Class<? extends ClassInstanceConfiguration<T>> cacheLevelConfig,
                                boolean uniqueClassLevelConfig)
Method Detail

getPreconfigured

protected ClassInstanceConfiguration<T> getPreconfigured(K alias)

newInstance

protected T newInstance(K alias,
                        CacheConfiguration<?,?> cacheConfiguration)

newInstance

protected T newInstance(K alias,
                        ServiceConfiguration<?> serviceConfiguration)

releaseInstance

protected void releaseInstance(T instance)
                        throws java.io.IOException
Throws:
java.io.IOException

start

public void start(ServiceProvider serviceProvider)

stop

public void stop()