Package org.faktorips.runtime
Class DefaultCacheFactory
java.lang.Object
org.faktorips.runtime.internal.AbstractCacheFactory
org.faktorips.runtime.DefaultCacheFactory
- All Implemented Interfaces:
ICacheFactory
Default cache factory. Uses SoftReferenceCaches for each object type.
- Author:
- Jan Ortmann
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultCacheFactory(ClassLoader cl, int initialCapacityForProductCmpts, int initialCapacityForProductCmptGenerations, int initialCapacityForTablesByClassname, int initialCapacityForTablesByQname, int initialCapacityForEnumContentByClassName) Deprecated. -
Method Summary
Modifier and TypeMethodDescription<K,V> Memoizer<K, V> createCache(IComputable<K, V> computable) Creates a new cache of the given type.intprotected intgetInitialSize(Class<?> typeClass) voidsetConcurrencyLevel(int concurrencyLevel) voidsetDefaultInitialSize(int defaultInitialSize) voidsetInitialSize(Class<?> typeClass, int size) Methods inherited from class org.faktorips.runtime.internal.AbstractCacheFactory
createEnumCache, createProductCmptCache, createProductCmptGenerationCache, createTableCache
-
Constructor Details
-
DefaultCacheFactory
-
DefaultCacheFactory
@Deprecated public DefaultCacheFactory(ClassLoader cl, int initialCapacityForProductCmpts, int initialCapacityForProductCmptGenerations, int initialCapacityForTablesByClassname, int initialCapacityForTablesByQname, int initialCapacityForEnumContentByClassName) Deprecated.Use the default constructor and set the cache size by callingsetInitialSize(Class, int)insteadConstructor to set the initial capacity of the caches- Parameters:
initialCapacityForTablesByQname- not used anymore!initialCapacityForEnumContentByClassName- not used anymore!
-
-
Method Details
-
setInitialSize
-
setDefaultInitialSize
public void setDefaultInitialSize(int defaultInitialSize) - Parameters:
defaultInitialSize- The defaultInitialSize to set.
-
getInitialSize
-
createCache
Description copied from interface:ICacheFactoryCreates a new cache of the given type. -
setConcurrencyLevel
public void setConcurrencyLevel(int concurrencyLevel) -
getConcurrencyLevel
public int getConcurrencyLevel()
-
setInitialSize(Class, int)instead