Example usage for org.apache.solr.core SolrResourceLoader getManagedResourceRegistry

List of usage examples for org.apache.solr.core SolrResourceLoader getManagedResourceRegistry

Introduction

In this page you can find the example usage for org.apache.solr.core SolrResourceLoader getManagedResourceRegistry.

Prototype

public synchronized RestManager.Registry getManagedResourceRegistry() 

Source Link

Usage

From source file:cn.howardliu.lucene.extension.BaseManagedTokenFilterFactory.java

License:Apache License

/**
 * Registers an endpoint with the RestManager so that this component can be
 * managed using the REST API. This method can be invoked before all the
 * resources the {@link org.apache.solr.rest.RestManager} needs to initialize
 * a {@link org.apache.solr.rest.ManagedResource} are available, so this simply registers the need
 * to be managed at a specific endpoint and lets the RestManager deal with
 * initialization when ready./*from   w  ww.  ja  v  a  2  s . co  m*/
 */
@Override
public void inform(ResourceLoader loader) throws IOException {
    SolrResourceLoader solrResourceLoader = (SolrResourceLoader) loader;
    // here we want to register that we need to be managed
    // at a specified path and the ManagedResource impl class
    // that should be used to manage this component
    solrResourceLoader.getManagedResourceRegistry().registerManagedResource(getResourceId(),
            getManagedResourceImplClass(), this);
}

From source file:org.apache.lucene.analysis.ko.managed.BaseManagedDictionaryFilterFactory.java

License:Apache License

/**
 * Registers an endpoint with the RestManager so that this component can be
 * managed using the REST API. This method can be invoked before all the
 * resources the {@link org.apache.solr.rest.RestManager} needs to
 * initialize a {@link ManagedResource} are available, so this simply
 * registers the need to be managed at a specific endpoint and lets the
 * RestManager deal with initialization when ready.
 *///from  ww  w.j  a  va2s.c o  m
@Override
public void inform(ResourceLoader loader) throws IOException {
    SolrResourceLoader solrResourceLoader = (SolrResourceLoader) loader;

    // here we want to register that we need to be managed
    // at a specified path and the ManagedResource impl class
    // that should be used to manage this component
    solrResourceLoader.getManagedResourceRegistry().registerManagedResource(getResourceId(),
            ManagedKoreanDictionary.class, this);
}