Class PluginBag<T>

    • Constructor Detail

      • PluginBag

        public PluginBag(Class<T> klass,
                         SolrCore core,
                         boolean needThreadSafety)
        Pass needThreadSafety=true if plugins can be added and removed concurrently with lookups.
    • Method Detail

      • get

        public T get(String name)
        Get a plugin by name. If the plugin is not already instantiated, it is done here
      • get

        public T get(String name,
                     boolean useDefault)
        Fetches a plugin by name , or the default
        name - name using which it is registered
        useDefault - Return the default , if a plugin by that name does not exist
      • put

        public T put(String name,
                     T plugin)
        register a plugin by a name
      • isLoaded

        public boolean isLoaded(String name)
        To check if a plugin by a specified name is already loaded
      • close

        public void close()
        Close this registry. This will in turn call a close on all the contained plugins
        Specified by:
        close in interface AutoCloseable