public class PluginBag<T> extends Object implements AutoCloseable
Modifier and Type | Class and Description |
---|---|
class |
PluginBag.LazyPluginHolder<T>
A class that loads plugins Lazily.
|
static class |
PluginBag.PluginHolder<T>
An indirect reference to a plugin.
|
static class |
PluginBag.RuntimeLib
This represents a Runtime Jar.
|
Constructor and Description |
---|
PluginBag(Class<T> klass,
SolrCore core)
Constructs a non-threadsafe plugin registry
|
PluginBag(Class<T> klass,
SolrCore core,
boolean needThreadSafety)
Pass needThreadSafety=true if plugins can be added and removed concurrently with lookups.
|
Modifier and Type | Method and Description |
---|---|
Set<String> |
checkContains(Collection<String> names)
Check if any of the mentioned names are missing.
|
void |
close()
Close this registry.
|
boolean |
contains(String name) |
PluginBag.PluginHolder<T> |
createPlugin(PluginInfo info) |
T |
get(String name)
Get a plugin by name.
|
T |
get(String name,
boolean useDefault)
Fetches a plugin by name , or the default
|
ApiBag |
getApiBag() |
Map<String,PluginBag.PluginHolder<T>> |
getRegistry() |
boolean |
isLoaded(String name)
To check if a plugin by a specified name is already loaded
|
Set<String> |
keySet() |
T |
put(String name,
T plugin)
register a plugin by a name
|
Api |
v2lookup(String path,
String method,
Map<String,String> parts) |
public PluginBag(Class<T> klass, SolrCore core, boolean needThreadSafety)
public Set<String> checkContains(Collection<String> names)
public PluginBag.PluginHolder<T> createPlugin(PluginInfo info)
public T get(String name)
public T get(String name, boolean useDefault)
name
- name using which it is registereduseDefault
- Return the default , if a plugin by that name does not existpublic Map<String,PluginBag.PluginHolder<T>> getRegistry()
public boolean contains(String name)
public boolean isLoaded(String name)
public void close()
close
in interface AutoCloseable
public ApiBag getApiBag()
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.