Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.logging.log4j.core.config.plugins.processor
Class PluginCache

    java.lang.Object
      org.apache.logging.log4j.core.config.plugins.processor.PluginCache

    public class PluginCache

extends Object

Constructor Summary
`PluginCache()`

Method Summary
`Map<String,Map<String,PluginEntry>>` | `getAllCategories()` Returns all categories of plugins in this cache.
`Map<String,PluginEntry>` | `getCategory(String category)` Gets or creates a category of plugins.
`void` | `loadCacheFiles(Enumeration<URL> resources)` Loads and merges all the Log4j plugin cache files specified.
`int` | `size()` Gets the number of plugin categories registered.
`void` | `writeCache(OutputStream os)` Stores the plugin cache to a given OutputStream.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PluginCache

    public PluginCache()

Method Detail

### getAllCategories

    public Map<String,Map<String,PluginEntry>> getAllCategories()

  Returns all categories of plugins in this cache.

  Returns:
    all categories of plugins in this cache.
  Since:
    2.1

### getCategory

    public Map<String,PluginEntry> getCategory(String category)

  Gets or creates a category of plugins.

  Parameters:
    `category` - name of category to look up.
  Returns:
    plugin mapping of names to plugin entries.

### writeCache

    public void writeCache(OutputStream os)
                    throws IOException

  Stores the plugin cache to a given OutputStream.

  Parameters:
    `os` - destination to save cache to.
  Throws:
    `IOException`

### 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`

### size

    public int size()

  Gets the number of plugin categories registered.

  Returns:
    number of plugin categories in cache.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1999-2015 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.