Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the
* Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
* version 2 with the GNU Classpath Exception, which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
package com.sun.faces.application.resource;
import com.sun.faces.config.WebConfiguration;
import com.sun.faces.config.WebConfiguration.WebContextInitParameter;
import com.sun.faces.util.FacesLogger;
import com.sun.faces.util.MultiKeyConcurrentHashMap;
import com.sun.faces.util.Util;
import javax.servlet.ServletContext;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* 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.
*
*/
public class ResourceCache {
private static final Logger LOGGER = FacesLogger.RESOURCE.getLogger();
/**
* The ResourceInfo cache.
*/
private MultiKeyConcurrentHashMap