Package org.apache.myfaces.resource
Class TempDirFileCacheResourceLoader
java.lang.Object
org.apache.myfaces.resource.ResourceLoader
org.apache.myfaces.resource.ResourceLoaderWrapper
org.apache.myfaces.resource.TempDirFileCacheResourceLoader
- All Implemented Interfaces:
- FacesWrapper<ResourceLoader>
ResourceLoader that uses a temporal folder to cache resources, avoiding the problem
 described on  MYFACES-3586 (Performance improvement in Resource loading - 
 HIGH CPU inflating bytes in ResourceHandlerImpl.handleResourceRequest).
- Author:
- Leonardo Uribe
- 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from class org.apache.myfaces.resource.ResourceLoaderResourceLoader.VersionComparator
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringIf this param is set to true (default false), a temporal directory is created and all files handled by this ResourceLoader are cached there, avoiding the problem described on MYFACES-3586.static final booleanstatic final StringFields inherited from class org.apache.myfaces.resource.ResourceLoaderVERSION_INVALID
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidcreateTemporalFileVersion(FacesContext facesContext, ResourceMeta resourceMeta, File target) protected intgetResourceInputStream(ResourceMeta resourceMeta) getResourceInputStream(ResourceMeta resourceMeta, Resource resource) getResourceURL(ResourceMeta resourceMeta) Return the max available version found (if exists) or return null if no version available.protected voidstatic booleanisValidCreateTemporalFiles(FacesContext facesContext) Methods inherited from class org.apache.myfaces.resource.ResourceLoaderWrappercreateResourceMeta, getLibraryVersion, getPrefix, getResourceVersion, getVersionComparator, iterator, libraryExists, resourceExists, setPrefix, setVersionComparatorMethods inherited from class org.apache.myfaces.resource.ResourceLoadercreateResourceMeta
- 
Field Details- 
INIT_PARAM_TEMPORAL_RESOURCEHANDLER_CACHE_ENABLED@JSFWebConfigParam(since="2.1.11", expectedValues="true, false", defaultValue="false") public static final String INIT_PARAM_TEMPORAL_RESOURCEHANDLER_CACHE_ENABLEDIf this param is set to true (default false), a temporal directory is created and all files handled by this ResourceLoader are cached there, avoiding the problem described on MYFACES-3586. (Performance improvement in Resource loading - HIGH CPU inflating bytes in ResourceHandlerImpl.handleResourceRequest).- See Also:
 
- 
INIT_PARAM_TEMPORAL_RESOURCEHANDLER_CACHE_ENABLED_DEFAULTpublic static final boolean INIT_PARAM_TEMPORAL_RESOURCEHANDLER_CACHE_ENABLED_DEFAULT- See Also:
 
- 
TEMP_FILES_LOCK_MAP- See Also:
 
 
- 
- 
Constructor Details- 
TempDirFileCacheResourceLoader
 
- 
- 
Method Details- 
isValidCreateTemporalFiles
- 
initializeprotected void initialize()
- 
getResourceURLDescription copied from class:ResourceLoaderReturn the max available version found (if exists) or return null if no version available.- Overrides:
- getResourceURLin class- ResourceLoaderWrapper
 
- 
getResourceInputStream
- 
getResourceInputStream- Overrides:
- getResourceInputStreamin class- ResourceLoaderWrapper
 
- 
createTemporalFileVersionprotected void createTemporalFileVersion(FacesContext facesContext, ResourceMeta resourceMeta, File target) 
- 
getResourceBufferSizeprotected int getResourceBufferSize()
- 
getWrapped
 
-