Package org.apache.solr.api
Class ContainerPluginsRegistry
java.lang.Object
org.apache.solr.api.ContainerPluginsRegistry
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.solr.common.cloud.ClusterPropertiesListener,org.apache.solr.common.MapSerializable,org.apache.solr.common.MapWriter,org.apache.solr.common.NavigableObject,org.noggit.JSONWriter.Writable
public class ContainerPluginsRegistry
extends Object
implements org.apache.solr.common.cloud.ClusterPropertiesListener, org.apache.solr.common.MapWriter, Closeable
This class manages the container-level plugins and their Api-s. It is responsible for adding /
removing / replacing the plugins according to the updated configuration obtained from
ClusterPluginsSource.plugins().
Plugins instantiated by this class may implement zero or more Api-s, which are then
registered in the CoreContainer ApiBag. They may be also post-processed for additional
functionality by ContainerPluginsRegistry.PluginRegistryListener-s registered with this class.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassstatic enumstatic interfaceListener for notifications about added / deleted / modified plugins.Nested classes/interfaces inherited from interface org.apache.solr.common.MapWriter
org.apache.solr.common.MapWriter.EntryWriter -
Field Summary
FieldsFields inherited from interface org.apache.solr.common.MapWriter
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionContainerPluginsRegistry(CoreContainer coreContainer, ApiBag apiBag, ClusterPluginsSource pluginsSource) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()static Map<String, ContainerPluginsRegistry.Diff> compareMaps(Map<String, ?> a, Map<String, ?> b) static org.apache.solr.common.MapWriterconfigure(Object instance, Map<String, Object> config, org.apache.solr.client.solrj.request.beans.PluginMeta meta) static <T extends org.apache.solr.common.MapWriter>
Class<T> Get the generic type of aConfigurablePluginbooleanvoidrefresh()voidvoidA phaser that will advance phases every timeonChange(Map)is called.voidvoidwriteMap(org.apache.solr.common.MapWriter.EntryWriter ew) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.solr.common.MapWriter
jsonStr, toMap, writeMethods inherited from interface org.apache.solr.common.NavigableObject
_forEachEntry, _forEachEntry, _forEachEntry, _get, _get, _getStr, _getStr, _size
-
Field Details
-
CLUSTER_PLUGIN_EDIT_ENABLED
- See Also:
-
-
Constructor Details
-
ContainerPluginsRegistry
public ContainerPluginsRegistry(CoreContainer coreContainer, ApiBag apiBag, ClusterPluginsSource pluginsSource)
-
-
Method Details
-
onChange
- Specified by:
onChangein interfaceorg.apache.solr.common.cloud.ClusterPropertiesListener
-
setPhaser
A phaser that will advance phases every timeonChange(Map)is called. Useful for allowing tests to know when a new configuration is finished getting set. -
registerListener
-
unregisterListener
-
writeMap
- Specified by:
writeMapin interfaceorg.apache.solr.common.MapWriter- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
getPlugin
-
refresh
public void refresh() -
configure
public static org.apache.solr.common.MapWriter configure(Object instance, Map<String, Object> config, org.apache.solr.client.solrj.request.beans.PluginMeta meta) throws IOException- Throws:
IOException
-
getConfigClass
public static <T extends org.apache.solr.common.MapWriter> Class<T> getConfigClass(ConfigurablePlugin<T> o) Get the generic type of aConfigurablePlugin -
createInfo
public ContainerPluginsRegistry.ApiInfo createInfo(Map<String, Object> info, List<String> errs) throws IOException- Throws:
IOException
-
compareMaps
-