Class PluginCache
java.lang.Object
org.apache.logging.log4j.plugins.model.PluginCache
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns all namespaces of plugins in this cache.getNamespace
(String namespace) Gets or creates a namespace of plugins.void
loadCacheFiles
(Enumeration<URL> resources) Loads and merges all the Log4j plugin cache files specified.int
size()
Gets the number of plugin namespaces registered.
-
Constructor Details
-
PluginCache
public PluginCache()
-
-
Method Details
-
getAllNamespaces
Returns all namespaces of plugins in this cache.- Returns:
- all namespaces of plugins in this cache.
- Since:
- 2.1
-
getNamespace
Gets or creates a namespace of plugins.- Parameters:
namespace
- namespace to look up.- Returns:
- plugin mapping of names to plugin entries.
-
loadCacheFiles
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.
-