public class CtClassCacheFactory extends Object
-Dorg.jboss.classpool.policy 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
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_LRU_POLICY_MAX |
static int |
DEFAULT_LRU_POLICY_MIN |
static int |
DEFAULT_TIMED_POLICY_LIFETIME |
static int |
DEFAULT_TIMED_POLICY_RESOLUTION |
static String |
LRU_POLICY_MAX |
static String |
LRU_POLICY_MIN |
static String |
POLICY_CLASS |
static String |
TIMED_POLICY_LIFETIME |
static String |
TIMED_POLICY_RESOLUTION |
| Constructor and Description |
|---|
CtClassCacheFactory() |
| Modifier and Type | Method and Description |
|---|---|
CtClassCache |
createCache() |
static CtClassCacheFactory |
createFromProperties() |
static CtClassCacheFactory |
createFromProperties(Properties properties) |
int |
getLifetime()
Get the lifetime
|
int |
getMax()
Get the max
|
int |
getMin()
Get the min
|
Class<? extends org.jboss.util.CachePolicy> |
getPolicyClass()
Get the policyClass
|
int |
getResolution()
Get the resolution
|
public static final String POLICY_CLASS
public static final String TIMED_POLICY_LIFETIME
public static final String TIMED_POLICY_RESOLUTION
public static final String LRU_POLICY_MIN
public static final String LRU_POLICY_MAX
public static final int DEFAULT_TIMED_POLICY_LIFETIME
public static final int DEFAULT_TIMED_POLICY_RESOLUTION
public static final int DEFAULT_LRU_POLICY_MIN
public static final int DEFAULT_LRU_POLICY_MAX
public static CtClassCacheFactory createFromProperties()
public static CtClassCacheFactory createFromProperties(Properties properties)
public CtClassCache createCache()
public Class<? extends org.jboss.util.CachePolicy> getPolicyClass()
public int getLifetime()
public int getResolution()
public int getMin()
public int getMax()
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.