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 java.lang.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 int
DEFAULT_CACHE_SIZE
-
Constructor Summary
Constructors Constructor Description ScriptCacheImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
activate(org.apache.sling.scripting.core.impl.ScriptCacheImplConfiguration configuration, org.osgi.framework.BundleContext bundleCtx)
void
clear()
protected void
deactivate()
protected java.util.Set<java.lang.String>
getCachedScripts()
org.apache.sling.scripting.api.CachedScript
getScript(java.lang.String scriptPath)
void
handleEvent(org.osgi.service.event.Event event)
void
onChange(@NotNull java.util.List<org.apache.sling.api.resource.observation.ResourceChange> list)
void
putScript(org.apache.sling.scripting.api.CachedScript script)
boolean
removeScript(java.lang.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(java.lang.String scriptPath)
- Specified by:
getScript
in interfaceorg.apache.sling.scripting.api.ScriptCache
-
putScript
public void putScript(org.apache.sling.scripting.api.CachedScript script)
- Specified by:
putScript
in interfaceorg.apache.sling.scripting.api.ScriptCache
-
clear
public void clear()
- Specified by:
clear
in interfaceorg.apache.sling.scripting.api.ScriptCache
-
removeScript
public boolean removeScript(java.lang.String scriptPath)
- Specified by:
removeScript
in interfaceorg.apache.sling.scripting.api.ScriptCache
-
onChange
public void onChange(@NotNull @NotNull java.util.List<org.apache.sling.api.resource.observation.ResourceChange> list)
- Specified by:
onChange
in interfaceorg.apache.sling.api.resource.observation.ResourceChangeListener
-
getCachedScripts
protected java.util.Set<java.lang.String> getCachedScripts()
-
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:
handleEvent
in interfaceorg.osgi.service.event.EventHandler
-
-