Package org.apache.solr.rest
Class RestManager.Registry
- java.lang.Object
-
- org.apache.solr.rest.RestManager.Registry
-
- Enclosing class:
- RestManager
public static class RestManager.Registry extends Object
Per-core registry of ManagedResources found during core initialization.Registering of managed resources can happen before the RestManager is fully initialized. To avoid timing issues, resources register themselves and then the RestManager initializes all ManagedResources before the core is activated.
-
-
Constructor Summary
Constructors Constructor Description Registry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<org.apache.solr.rest.RestManager.ManagedResourceRegistration>
getRegistered()
Get a view of the currently registered resources.Set<String>
getReservedEndpoints()
Returns the set of non-registrable endpoints.void
registerManagedResource(String resourceId, Class<? extends ManagedResource> implClass, ManagedResourceObserver observer)
Register the need to use a ManagedResource; this method is typically called by a Solr component during core initialization to register itself as an observer of a specific type of ManagedResource.
-
-
-
Method Detail
-
getReservedEndpoints
public Set<String> getReservedEndpoints()
Returns the set of non-registrable endpoints.
-
getRegistered
public Collection<org.apache.solr.rest.RestManager.ManagedResourceRegistration> getRegistered()
Get a view of the currently registered resources.
-
registerManagedResource
public void registerManagedResource(String resourceId, Class<? extends ManagedResource> implClass, ManagedResourceObserver observer)
Register the need to use a ManagedResource; this method is typically called by a Solr component during core initialization to register itself as an observer of a specific type of ManagedResource. As many Solr components may share the same ManagedResource, this method only serves to associate the observer with an endpoint and implementation class. The actual construction of the ManagedResource and loading of data from storage occurs later once the RestManager is fully initialized.- Parameters:
resourceId
- - An endpoint in the Rest API to manage the resource; must start with /config and /schema.implClass
- - Class that implements ManagedResource.observer
- - Solr component that needs to know when the data being managed by the ManagedResource is loaded, such as a TokenFilter.
-
-