public class RestManager extends Object
Modifier and Type | Class and Description |
---|---|
static class |
RestManager.ManagedEndpoint
Request handling needs a lightweight object to delegate a request to.
|
static class |
RestManager.Registry
Per-core registry of ManagedResources found during core initialization.
|
Modifier and Type | Field and Description |
---|---|
protected org.apache.solr.rest.RestManager.RestManagerManagedResource |
endpoint |
protected SolrResourceLoader |
loader |
protected Map<String,ManagedResource> |
managed |
static String |
MANAGED_ENDPOINT |
protected RestManager.Registry |
registry |
static String |
SCHEMA_BASE_PATH |
protected ManagedResourceStorage.StorageIO |
storageIO |
Constructor and Description |
---|
RestManager() |
Modifier and Type | Method and Description |
---|---|
ManagedResource |
addManagedResource(String resourceId,
Class<? extends ManagedResource> clazz)
If not already registered, registers the given
ManagedResource subclass
at the given resourceId, creates an instance. |
protected ManagedResource |
createManagedResource(org.apache.solr.rest.RestManager.ManagedResourceRegistration reg)
Creates a ManagedResource using registration information.
|
void |
deleteManagedResource(ManagedResource res)
Deletes a managed resource if it is not being used by any Solr components.
|
ManagedResource |
getManagedResource(String resourceId)
Returns the
ManagedResource subclass instance corresponding
to the given resourceId from the registry. |
ManagedResource |
getManagedResourceOrNull(String resourceId)
Returns the
ManagedResource subclass instance corresponding
to the given resourceId from the registry, or null if no resource
has been registered with the given resourceId. |
void |
init(SolrResourceLoader loader,
NamedList<String> initArgs,
ManagedResourceStorage.StorageIO storageIO)
Initializes the RestManager with the storageIO being optionally created outside of this implementation
such as to use ZooKeeper instead of the local FS.
|
public static final String SCHEMA_BASE_PATH
public static final String MANAGED_ENDPOINT
protected ManagedResourceStorage.StorageIO storageIO
protected RestManager.Registry registry
protected Map<String,ManagedResource> managed
protected org.apache.solr.rest.RestManager.RestManagerManagedResource endpoint
protected SolrResourceLoader loader
public void init(SolrResourceLoader loader, NamedList<String> initArgs, ManagedResourceStorage.StorageIO storageIO) throws SolrException
SolrException
public ManagedResource addManagedResource(String resourceId, Class<? extends ManagedResource> clazz)
ManagedResource
subclass
at the given resourceId, creates an instance. Returns the corresponding instance.protected ManagedResource createManagedResource(org.apache.solr.rest.RestManager.ManagedResourceRegistration reg) throws SolrException
SolrException
public ManagedResource getManagedResource(String resourceId)
ManagedResource
subclass instance corresponding
to the given resourceId from the registry.SolrException
- if no managed resource is registered with
the given resourceId.public ManagedResource getManagedResourceOrNull(String resourceId)
ManagedResource
subclass instance corresponding
to the given resourceId from the registry, or null if no resource
has been registered with the given resourceId.public void deleteManagedResource(ManagedResource res)
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.