This is the caching mechanism for caching ResourceInfo instances to offset the cost of looking up the resource.
This cache uses a background thread to check for modifications to the underlying
webapp or JAR files containing resources. This check is periodic, configurable
via context init param com.sun.faces.resourceUpdateCheckPeriod. Through
this config option, the cache can also be made static or completely disabled.
If the value of of this option is 0, then no check will be made
making the cache static. If value of this option is less than 0,
then no caching will be perfomed. Otherwise, the value of the option will
be the number of minutes between modification checks.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private long | checkPeriod
Resource check period in minutes. |
| private static final Logger | |
| private MultiKeyConcurrentHashMap | resourceCache
The |
| Access | Constructor and Description |
|---|---|
| public | |
| private | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public ResourceInfo | Returns: previous value associated with specified key, or null if there was no mapping for keyresource metadata info, List<String> the contracts contracts)Add the |
| public void | |
| public ResourceInfo | |
| private static Long | |
| private static String |
| checkPeriod | back to summary |
|---|---|
| private long checkPeriod Resource check period in minutes. | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| resourceCache | back to summary |
|---|---|
| private MultiKeyConcurrentHashMap<Object, ResourceCache. The | |
| ResourceCache | back to summary |
|---|---|
| public ResourceCache() Constructs a new ResourceCache. | |
| ResourceCache | back to summary |
|---|---|
| private ResourceCache(WebConfiguration config) | |
| ResourceCache | back to summary |
|---|---|
| pack-priv ResourceCache(long period) | |
| add | back to summary |
|---|---|
| public ResourceInfo add(ResourceInfo info, List<String> contracts) Add the
| |
| clear | back to summary |
|---|---|
| public void clear() Empty the cache. | |
| get | back to summary |
|---|---|
public ResourceInfo get(String name, String libraryName, String localePrefix, List<String> contracts)
| |
| getCheckPeriod | back to summary |
|---|---|
| private static Long getCheckPeriod(WebConfiguration webConfig) | |
| getServletContextIdentifier | back to summary |
|---|---|
| private static String getServletContextIdentifier(ServletContext context) | |
| Modifier and Type | Field and Description |
|---|---|
| private Long | |
| private ResourceInfo |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private ResourceInfo | |
| private boolean |
| checkTime | back to summary |
|---|---|
| private Long checkTime | |
| resourceInfo | back to summary |
|---|---|
| private ResourceInfo resourceInfo | |
| ResourceInfoCheckPeriodProxy | back to summary |
|---|---|
| public ResourceInfoCheckPeriodProxy(ResourceInfo resourceInfo, long checkPeriod) | |
| getResourceInfo | back to summary |
|---|---|
| private ResourceInfo getResourceInfo() | |
| needsRefreshed | back to summary |
|---|---|
| private boolean needsRefreshed() | |