is not set, no caching will be used in the classpools.
It can be set to the name of any org.jboss.util.CachePolicy
implementation
with a default constructor. Two CachePolicy
implementations
supported out of the box with extra properties are
org.jboss.util.LRUCachePolicy
- A least recently used cache policy with the following properties
-Dorg.jboss.classpool.policy.min
- the minimum size of the cache. Default is 10
-Dorg.jboss.classpool.policy.max
- the maximum size of the cache. Default is 100
org.jboss.util.TimedCachePolicy
- A timed cache policy with the following properties
-Dorg.jboss.classpool.policy.lifetime
- the maximum age in seconds for an entry in the cache. Default is 20s
-Dorg.jboss.classpool.policy.resolution
- the frequency in seconds the entries are cleaned. Default is every 3 seconds
- Version:
- $Revision: 1.1 $
- Author:
- Kabir Khan
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
POLICY_CLASS
public static final String POLICY_CLASS
- See Also:
- Constant Field Values
TIMED_POLICY_LIFETIME
public static final String TIMED_POLICY_LIFETIME
- See Also:
- Constant Field Values
TIMED_POLICY_RESOLUTION
public static final String TIMED_POLICY_RESOLUTION
- See Also:
- Constant Field Values
LRU_POLICY_MIN
public static final String LRU_POLICY_MIN
- See Also:
- Constant Field Values
LRU_POLICY_MAX
public static final String LRU_POLICY_MAX
- See Also:
- Constant Field Values
DEFAULT_TIMED_POLICY_LIFETIME
public static final int DEFAULT_TIMED_POLICY_LIFETIME
- See Also:
- Constant Field Values
DEFAULT_TIMED_POLICY_RESOLUTION
public static final int DEFAULT_TIMED_POLICY_RESOLUTION
- See Also:
- Constant Field Values
DEFAULT_LRU_POLICY_MIN
public static final int DEFAULT_LRU_POLICY_MIN
- See Also:
- Constant Field Values
DEFAULT_LRU_POLICY_MAX
public static final int DEFAULT_LRU_POLICY_MAX
- See Also:
- Constant Field Values
CtClassCacheFactory
public CtClassCacheFactory()
createFromProperties
public static CtClassCacheFactory createFromProperties()
createFromProperties
public static CtClassCacheFactory createFromProperties(Properties properties)
createCache
public CtClassCache createCache()
getPolicyClass
public Class<? extends org.jboss.util.CachePolicy> getPolicyClass()
- Get the policyClass
- Returns:
- the policyClass
getLifetime
public int getLifetime()
- Get the lifetime
- Returns:
- the lifetime
getResolution
public int getResolution()
- Get the resolution
- Returns:
- the resolution
getMin
public int getMin()
- Get the min
- Returns:
- the min
getMax
public int getMax()
- Get the max
- Returns:
- the max
Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.