Class ScriptCacheImpl
- java.lang.Object
-
- org.apache.sling.scripting.core.impl.ScriptCacheImpl
-
- All Implemented Interfaces:
org.apache.sling.api.resource.observation.ExternalResourceChangeListener,org.apache.sling.api.resource.observation.ResourceChangeListener,org.apache.sling.scripting.api.ScriptCache,org.osgi.service.event.EventHandler
public class ScriptCacheImpl extends Object implements org.apache.sling.scripting.api.ScriptCache, org.apache.sling.api.resource.observation.ResourceChangeListener, org.apache.sling.api.resource.observation.ExternalResourceChangeListener, org.osgi.service.event.EventHandler
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_CACHE_SIZE
-
Constructor Summary
Constructors Constructor Description ScriptCacheImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidactivate(org.apache.sling.scripting.core.impl.ScriptCacheImplConfiguration configuration, org.osgi.framework.BundleContext bundleCtx)voidclear()protected voiddeactivate()protected Set<String>getCachedScripts()org.apache.sling.scripting.api.CachedScriptgetScript(String scriptPath)voidhandleEvent(org.osgi.service.event.Event event)voidonChange(@NotNull List<org.apache.sling.api.resource.observation.ResourceChange> list)voidputScript(org.apache.sling.scripting.api.CachedScript script)booleanremoveScript(String scriptPath)
-
-
-
Field Detail
-
DEFAULT_CACHE_SIZE
public static final int DEFAULT_CACHE_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getScript
public org.apache.sling.scripting.api.CachedScript getScript(String scriptPath)
- Specified by:
getScriptin interfaceorg.apache.sling.scripting.api.ScriptCache
-
putScript
public void putScript(org.apache.sling.scripting.api.CachedScript script)
- Specified by:
putScriptin interfaceorg.apache.sling.scripting.api.ScriptCache
-
clear
public void clear()
- Specified by:
clearin interfaceorg.apache.sling.scripting.api.ScriptCache
-
removeScript
public boolean removeScript(String scriptPath)
- Specified by:
removeScriptin interfaceorg.apache.sling.scripting.api.ScriptCache
-
onChange
public void onChange(@NotNull @NotNull List<org.apache.sling.api.resource.observation.ResourceChange> list)- Specified by:
onChangein interfaceorg.apache.sling.api.resource.observation.ResourceChangeListener
-
activate
protected void activate(org.apache.sling.scripting.core.impl.ScriptCacheImplConfiguration configuration, org.osgi.framework.BundleContext bundleCtx)
-
deactivate
protected void deactivate()
-
handleEvent
public void handleEvent(org.osgi.service.event.Event event)
- Specified by:
handleEventin interfaceorg.osgi.service.event.EventHandler
-
-