Class 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
    • Constructor Detail

      • ScriptCacheImpl

        public ScriptCacheImpl()
    • Method Detail

      • getScript

        public org.apache.sling.scripting.api.CachedScript getScript​(String scriptPath)
        Specified by:
        getScript in interface org.apache.sling.scripting.api.ScriptCache
      • putScript

        public void putScript​(org.apache.sling.scripting.api.CachedScript script)
        Specified by:
        putScript in interface org.apache.sling.scripting.api.ScriptCache
      • clear

        public void clear()
        Specified by:
        clear in interface org.apache.sling.scripting.api.ScriptCache
      • removeScript

        public boolean removeScript​(String scriptPath)
        Specified by:
        removeScript in interface org.apache.sling.scripting.api.ScriptCache
      • onChange

        public void onChange​(@NotNull
                             @NotNull List<org.apache.sling.api.resource.observation.ResourceChange> list)
        Specified by:
        onChange in interface org.apache.sling.api.resource.observation.ResourceChangeListener
      • getCachedScripts

        protected Set<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 interface org.osgi.service.event.EventHandler