Class StrongCachingModuleScriptProvider
- java.lang.Object
- 
- org.mozilla.javascript.commonjs.module.provider.CachingModuleScriptProviderBase
- 
- org.mozilla.javascript.commonjs.module.provider.StrongCachingModuleScriptProvider
 
 
- 
- All Implemented Interfaces:
- java.io.Serializable,- ModuleScriptProvider
 
 public class StrongCachingModuleScriptProvider extends CachingModuleScriptProviderBase A module script provider that uses a module source provider to load modules and caches the loaded modules. It strongly references the loaded modules, thus a module once loaded will not be eligible for garbage collection before the module provider itself becomes eligible.- See Also:
- Serialized Form
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class org.mozilla.javascript.commonjs.module.provider.CachingModuleScriptProviderBaseCachingModuleScriptProviderBase.CachedModuleScript
 
- 
 - 
Constructor SummaryConstructors Constructor Description StrongCachingModuleScriptProvider(ModuleSourceProvider moduleSourceProvider)Creates a new module provider with the specified module source provider.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CachingModuleScriptProviderBase.CachedModuleScriptgetLoadedModule(java.lang.String moduleId)Retrieves an already loaded moduleScript stored usingCachingModuleScriptProviderBase.putLoadedModule(String, ModuleScript, Object).protected voidputLoadedModule(java.lang.String moduleId, ModuleScript moduleScript, java.lang.Object validator)Store a loaded module script for later retrieval usingCachingModuleScriptProviderBase.getLoadedModule(String).- 
Methods inherited from class org.mozilla.javascript.commonjs.module.provider.CachingModuleScriptProviderBasegetConcurrencyLevel, getModuleScript
 
- 
 
- 
- 
- 
Constructor Detail- 
StrongCachingModuleScriptProviderpublic StrongCachingModuleScriptProvider(ModuleSourceProvider moduleSourceProvider) Creates a new module provider with the specified module source provider.- Parameters:
- moduleSourceProvider- provider for modules' source code
 
 
- 
 - 
Method Detail- 
getLoadedModuleprotected CachingModuleScriptProviderBase.CachedModuleScript getLoadedModule(java.lang.String moduleId) Description copied from class:CachingModuleScriptProviderBaseRetrieves an already loaded moduleScript stored usingCachingModuleScriptProviderBase.putLoadedModule(String, ModuleScript, Object).- Specified by:
- getLoadedModulein class- CachingModuleScriptProviderBase
- Parameters:
- moduleId- the ID of the module
- Returns:
- a cached module script, or null if the module is not loaded.
 
 - 
putLoadedModuleprotected void putLoadedModule(java.lang.String moduleId, ModuleScript moduleScript, java.lang.Object validator)Description copied from class:CachingModuleScriptProviderBaseStore a loaded module script for later retrieval usingCachingModuleScriptProviderBase.getLoadedModule(String).- Specified by:
- putLoadedModulein class- CachingModuleScriptProviderBase
- Parameters:
- moduleId- the ID of the module
- moduleScript- the module script
- validator- the validator for the module's source text entity
 
 
- 
 
-