Class PluginCache

java.lang.Object
org.apache.logging.log4j.plugins.model.PluginCache

public class PluginCache extends Object
  • Constructor Details

    • PluginCache

      public PluginCache()
  • Method Details

    • getAllNamespaces

      public Map<String,Map<String,PluginEntry>> getAllNamespaces()
      Returns all namespaces of plugins in this cache.
      Returns:
      all namespaces of plugins in this cache.
      Since:
      2.1
    • getNamespace

      public Map<String,PluginEntry> getNamespace(String namespace)
      Gets or creates a namespace of plugins.
      Parameters:
      namespace - namespace to look up.
      Returns:
      plugin mapping of names to plugin entries.
    • loadCacheFiles

      public void loadCacheFiles(Enumeration<URL> resources) throws IOException
      Loads and merges all the Log4j plugin cache files specified. Usually, this is obtained via a ClassLoader.
      Parameters:
      resources - URLs to all the desired plugin cache files to load.
      Throws:
      IOException - if an I/O exception occurs.
    • size

      public int size()
      Gets the number of plugin namespaces registered.
      Returns:
      number of plugin namespaces in cache.