class PluginCacheConfigurator {

    private static final Logger Log = LoggerFactory.getLogger(PluginCacheConfigurator.class);

    private InputStream configDataStream;

    public void setInputStream(InputStream configDataStream) {
        this.configDataStream = configDataStream;
    }

    public void configure(String pluginName) {
        try {
            Document cacheXml = SAXReaderUtil.readDocument(configDataStream);
            List<Node> mappings = cacheXml.selectNodes("/cache-config/cache-mapping");
            for (Node mapping: mappings) {
                registerCache(pluginName, mapping);
            }
        } catch (ExecutionException e) {
            Log.error(e.getMessage(), e);
        } catch (InterruptedException e) {
            Thread.currentThread().interrupt();
            Log.error(e.getMessage(), e);
        }
    }

    private void registerCache(String pluginName, Node configData) {
        String cacheName = configData.selectSingleNode("cache-name").getStringValue();
        String schemeName = configData.selectSingleNode("scheme-name").getStringValue();
        if (cacheName == null || schemeName == null) {
            throw new IllegalArgumentException("Both cache-name and scheme-name elements are required. Found cache-name: " + cacheName +
            " and scheme-name: " + schemeName);
        }

        Map<String, String> initParams = readInitParams(configData);
        CacheInfo info = new CacheInfo(cacheName, CacheInfo.Type.valueof(schemeName), initParams);
        PluginCacheRegistry.getInstance().registerCache(pluginName, info);
    }

    private Map<String, String> readInitParams(Node configData) {<FILL_FUNCTION_BODY>}
}

        Map<String, String> paramMap = new HashMap<>();
        List<Node> params = configData.selectNodes("init-params/init-param");
        for (Node param : params) {
            String paramName = param.selectSingleNode("param-name").getStringValue();
            String paramValue = param.selectSingleNode("param-value").getStringValue();
            paramMap.put(paramName, paramValue);
        }

        return paramMap;
    
<no_super_class>