Package org.apache.struts2.ognl
Class DefaultOgnlCacheFactory<Key,Value>
java.lang.Object
org.apache.struts2.ognl.DefaultOgnlCacheFactory<Key,Value>
- Type Parameters:
Key
- The type for the cache key entriesValue
- The type for the cache value entries
- All Implemented Interfaces:
OgnlCacheFactory<Key,
Value>
- Direct Known Subclasses:
DefaultOgnlBeanInfoCacheFactory
,DefaultOgnlExpressionCacheFactory
public class DefaultOgnlCacheFactory<Key,Value>
extends Object
implements OgnlCacheFactory<Key,Value>
Default OGNL Cache factory implementation.
Currently used for Expression cache and BeanInfo cache creation.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.struts2.ognl.OgnlCacheFactory
OgnlCacheFactory.CacheType
-
Constructor Summary
ConstructorDescriptionDefaultOgnlCacheFactory
(int cacheMaxSize, OgnlCacheFactory.CacheType defaultCacheType) DefaultOgnlCacheFactory
(int cacheMaxSize, OgnlCacheFactory.CacheType defaultCacheType, int initialCapacity) -
Method Summary
Modifier and TypeMethodDescriptionbuildOgnlCache
(int evictionLimit, int initialCapacity, float loadFactor, OgnlCacheFactory.CacheType cacheType) int
-
Constructor Details
-
DefaultOgnlCacheFactory
-
DefaultOgnlCacheFactory
public DefaultOgnlCacheFactory(int cacheMaxSize, OgnlCacheFactory.CacheType defaultCacheType, int initialCapacity)
-
-
Method Details
-
buildOgnlCache
- Specified by:
buildOgnlCache
in interfaceOgnlCacheFactory<Key,
Value>
-
buildOgnlCache
public OgnlCache<Key,Value> buildOgnlCache(int evictionLimit, int initialCapacity, float loadFactor, OgnlCacheFactory.CacheType cacheType) - Specified by:
buildOgnlCache
in interfaceOgnlCacheFactory<Key,
Value> - Parameters:
evictionLimit
- maximum capacity of the cache where applicable for cache type choseninitialCapacity
- initial capacity of the cache where applicable for cache type chosenloadFactor
- load factor of the cache where applicable for cache type chosencacheType
- type of cache to build- Returns:
- a new cache instance
-
getCacheMaxSize
public int getCacheMaxSize()- Specified by:
getCacheMaxSize
in interfaceOgnlCacheFactory<Key,
Value>
-
getDefaultCacheType
- Specified by:
getDefaultCacheType
in interfaceOgnlCacheFactory<Key,
Value>
-