public class OakSolrUtils extends Object
| Constructor and Description |
|---|
OakSolrUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <T extends OakSolrConfigurationProvider> |
adaptOsgiOakSolrConfigurationProvider(Class<T> providerClass)
adapt the OSGi Solr
OakSolrConfigurationProvider service of a given extending class
and tries to instantiate it if non existing. |
static org.apache.jackrabbit.oak.spi.query.QueryIndexProvider |
adaptOsgiQueryIndexProvider()
adapts the OSGi Solr
QueryIndexProvider service |
static <T extends SolrServerProvider> |
adaptOsgiSolrServerProvider(Class<T> providerClass)
adapt the OSGi Solr
SolrServerProvider service of a given extending class and tries
to instantiate it if non existing. |
static boolean |
checkServerAlive(org.apache.solr.client.solrj.SolrServer solrServer)
Check if a given Solr instance is alive
|
static void |
commitByPolicy(org.apache.solr.client.solrj.SolrServer solrServer,
CommitPolicy commitPolicy)
Trigger a Solr commit on the basis of the given commit policy (e.g.
|
static <T extends OakSolrConfigurationProvider> |
getOakSolrConfigurationProvider(Class<T> providerClass) |
static <T extends SolrServerProvider> |
getSolrServerProvider(Class<T> providerClass) |
public static boolean checkServerAlive(@Nonnull org.apache.solr.client.solrj.SolrServer solrServer) throws IOException, org.apache.solr.client.solrj.SolrServerException
solrServer - the SolrServer used to communicate with the Solr instancetrue if the given Solr instance is alive and respondingIOException - if any low level IO error occursorg.apache.solr.client.solrj.SolrServerException - if any error occurs while trying to communicate with the Solr instancepublic static org.apache.jackrabbit.oak.spi.query.QueryIndexProvider adaptOsgiQueryIndexProvider()
QueryIndexProvider serviceSolrQueryIndexProviderpublic static <T extends SolrServerProvider> SolrServerProvider adaptOsgiSolrServerProvider(Class<T> providerClass)
SolrServerProvider service of a given extending class and tries
to instantiate it if non existing.T - the SolrServerProvider extensionproviderClass - the Class extending SolrServerProvider to adapt or instantiateSolrServerProvider adapted from the OSGi service, or a directly
instantiated one or null if both failedpublic static <T extends SolrServerProvider> SolrServerProvider getSolrServerProvider(Class<T> providerClass)
public static <T extends OakSolrConfigurationProvider> OakSolrConfigurationProvider adaptOsgiOakSolrConfigurationProvider(Class<T> providerClass)
OakSolrConfigurationProvider service of a given extending class
and tries to instantiate it if non existing.T - the OakSolrConfigurationProvider extensionproviderClass - the Class extending OakSolrConfigurationProvider to adapt or
instantiateOakSolrConfigurationProvider adapted from the OSGi service, or a directly
instantiated one or null if both failedpublic static <T extends OakSolrConfigurationProvider> OakSolrConfigurationProvider getOakSolrConfigurationProvider(Class<T> providerClass)
public static void commitByPolicy(org.apache.solr.client.solrj.SolrServer solrServer,
CommitPolicy commitPolicy)
throws IOException,
org.apache.solr.client.solrj.SolrServerException
solrServer - the SolrServer used to communicate with the Solr instancecommitPolicy - the CommitPolicy used to commit changes to a Solr indexIOException - if any low level IO error occursorg.apache.solr.client.solrj.SolrServerException - if any error occurs while trying to communicate with the Solr instanceCopyright © 2012-2014 The Apache Software Foundation. All Rights Reserved.