Examples of SolrServerProvider


Examples of org.apache.jackrabbit.oak.plugins.index.solr.server.SolrServerProvider

     * @return a {@link SolrServerProvider} adapted from the OSGi service, or a directly
     *         instantiated one or <code>null</code> if both failed
     */
    public static <T extends SolrServerProvider> SolrServerProvider adaptOsgiSolrServerProvider(
                    Class<T> providerClass) {
        SolrServerProvider solrServerProvider = null;
        try {
            BundleContext ctx = FrameworkUtil.getBundle(providerClass).getBundleContext();
            ServiceReference serviceReference = ctx.getServiceReference(SolrServerProvider.class
                            .getName());
            if (serviceReference != null) {
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.index.solr.server.SolrServerProvider

        return solrServerProvider;
    }

    public static <T extends SolrServerProvider> SolrServerProvider getSolrServerProvider(
                    Class<T> providerClass) {
        SolrServerProvider solrServerProvider = adaptOsgiSolrServerProvider(providerClass);
        if (solrServerProvider == null && providerClass != null) {
            try {
                solrServerProvider = providerClass.newInstance();
            } catch (InstantiationException e) {
                // do nothing
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.index.solr.server.SolrServerProvider

        try {
            solrServer = new EmbeddedSolrServerProvider(new EmbeddedSolrServerConfiguration(f.getPath(), "", "oak")).getSolrServer();
        } catch (Exception e) {
            throw new RuntimeException();
        }
        SolrServerProvider solrServerProvider = new SolrServerProvider() {
            @Override
            public SolrServer getSolrServer() throws Exception {
                return solrServer;
            }
        };
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.index.solr.server.SolrServerProvider

        try {
            solrServer = new EmbeddedSolrServerProvider(new EmbeddedSolrServerConfiguration(f.getPath(), "", "oak")).getSolrServer();
        } catch (Exception e) {
            throw new RuntimeException();
        }
        SolrServerProvider solrServerProvider = new SolrServerProvider() {
            @Override
            public SolrServer getSolrServer() throws Exception {
                return solrServer;
            }
        };
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.index.solr.server.SolrServerProvider

        try {
            solrServer = new EmbeddedSolrServerProvider(new EmbeddedSolrServerConfiguration(f.getPath(), "", "oak")).getSolrServer();
        } catch (Exception e) {
            throw new RuntimeException();
        }
        SolrServerProvider solrServerProvider = new SolrServerProvider() {
            @Override
            public SolrServer getSolrServer() throws Exception {
                return solrServer;
            }
        };
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.index.solr.server.SolrServerProvider

                if (serverType != null && !"none".equals(serverType)) {
                    SolrServerConfigurationProvider solrServerConfigurationProvider = solrServerConfigurationProviders.get(serverType);
                    if (solrServerConfigurationProvider != null) {
                        try {
                            SolrServerConfiguration solrServerConfiguration = solrServerConfigurationProvider.getSolrServerConfiguration();
                            SolrServerProvider solrServerProvider = solrServerConfiguration.getProvider();
                            cachedSolrServer = solrServerProvider.getSolrServer();
                        } catch (Exception e) {
                            log.error("could not get a SolrServerProvider of type {}", serverType, e);
                        }
                    }
                }
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.index.solr.server.SolrServerProvider

     * @return a {@link SolrServerProvider} adapted from the OSGi service, or a directly
     *         instantiated one or <code>null</code> if both failed
     */
    public static <T extends SolrServerProvider> SolrServerProvider adaptOsgiSolrServerProvider(
                    Class<T> providerClass) {
        SolrServerProvider solrServerProvider = null;
        try {
            BundleContext ctx = FrameworkUtil.getBundle(providerClass).getBundleContext();
            ServiceReference serviceReference = ctx.getServiceReference(SolrServerProvider.class
                            .getName());
            if (serviceReference != null) {
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.index.solr.server.SolrServerProvider

        return solrServerProvider;
    }

    public static <T extends SolrServerProvider> SolrServerProvider getSolrServerProvider(
                    Class<T> providerClass) {
        SolrServerProvider solrServerProvider = adaptOsgiSolrServerProvider(providerClass);
        if (solrServerProvider == null && providerClass != null) {
            try {
                solrServerProvider = providerClass.newInstance();
            } catch (InstantiationException e) {
                // do nothing
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.