Package org.apache.solr.api
Class ZkClusterPluginsSource
- java.lang.Object
-
- org.apache.solr.api.ZkClusterPluginsSource
-
- All Implemented Interfaces:
ClusterPluginsSource
public class ZkClusterPluginsSource extends Object implements ClusterPluginsSource
The plugin configurations are stored and retrieved from the ZooKeeper cluster properties, stored at theZkStateReader.CONTAINER_PLUGINS
location This supports mutable configurations, and management via the /cluster/plugin APIs
-
-
Constructor Summary
Constructors Constructor Description ZkClusterPluginsSource(CoreContainer coreContainer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContainerPluginsApi.Edit
getEditApi()
Get the Edit Api for this plugin source, if it supports edit operationsContainerPluginsApi.Read
getReadApi()
Get the Read Api for this plugin sourcevoid
persistPlugins(Function<Map<String,Object>,Map<String,Object>> modifier)
Persist the updated set of plugin configsMap<String,Object>
plugins()
Retrieve the current plugin configurations.
-
-
-
Constructor Detail
-
ZkClusterPluginsSource
public ZkClusterPluginsSource(CoreContainer coreContainer)
-
-
Method Detail
-
getReadApi
public ContainerPluginsApi.Read getReadApi()
Description copied from interface:ClusterPluginsSource
Get the Read Api for this plugin source- Specified by:
getReadApi
in interfaceClusterPluginsSource
- Returns:
- A
ContainerPluginsApi
Read Api for this plugin source
-
getEditApi
public ContainerPluginsApi.Edit getEditApi()
Description copied from interface:ClusterPluginsSource
Get the Edit Api for this plugin source, if it supports edit operations- Specified by:
getEditApi
in interfaceClusterPluginsSource
- Returns:
- A
ContainerPluginsApi
Edit Api for this plugin source, or null if the plugin source does not support editing the plugin configs
-
plugins
public Map<String,Object> plugins() throws IOException
Retrieve the current plugin configurations.- Specified by:
plugins
in interfaceClusterPluginsSource
- Returns:
- current plugin configurations, where keys are plugin names and values are
PluginMeta
plugin metadata. - Throws:
IOException
- on IO errors
-
persistPlugins
public void persistPlugins(Function<Map<String,Object>,Map<String,Object>> modifier) throws IOException
Description copied from interface:ClusterPluginsSource
Persist the updated set of plugin configs- Specified by:
persistPlugins
in interfaceClusterPluginsSource
- Parameters:
modifier
- A function providing the map of plugin configs to be persisted- Throws:
IOException
-
-