Class CoreContainerProvider

  • All Implemented Interfaces:
    EventListener, javax.servlet.ServletContextListener

    public class CoreContainerProvider
    extends Object
    implements javax.servlet.ServletContextListener
    A service that can provide access to solr cores. This allows us to have multiple filters and servlets that depend on SolrCore and CoreContainer, while still only having one CoreContainer per instance of solr.
    • Constructor Detail

      • CoreContainerProvider

        public CoreContainerProvider()
    • Method Detail

      • serviceForContext

        public static org.apache.solr.servlet.CoreContainerProvider.ServiceHolder serviceForContext​(javax.servlet.ServletContext ctx)
                                                                                             throws InterruptedException
        Throws:
        InterruptedException
      • contextInitialized

        public void contextInitialized​(javax.servlet.ServletContextEvent sce)
        Specified by:
        contextInitialized in interface javax.servlet.ServletContextListener
      • contextDestroyed

        public void contextDestroyed​(javax.servlet.ServletContextEvent sce)
        Specified by:
        contextDestroyed in interface javax.servlet.ServletContextListener
      • close

        public void close()
      • init

        public void init​(javax.servlet.ServletContext servletContext)
      • createCoreContainer

        protected CoreContainer createCoreContainer​(Path solrHome,
                                                    Properties nodeProps)
        CoreContainer initialization
        Returns:
        a CoreContainer to hold this server's cores