Search in sources :

Example 1 with FetchTaskPlugin

use of com.yelp.nrtsearch.server.plugins.FetchTaskPlugin in project nrtsearch by Yelp.

the class FetchTaskCreator method initialize.

/**
 * Initialize singleton instance of {@link FetchTaskCreator}. Registers any standard tasks and any
 * additional tasks provided by {@link FetchTaskPlugin}s.
 *
 * @param configuration service configuration
 * @param plugins list of loaded plugins
 */
public static void initialize(LuceneServerConfiguration configuration, Iterable<Plugin> plugins) {
    instance = new FetchTaskCreator(configuration);
    for (Plugin plugin : plugins) {
        if (plugin instanceof FetchTaskPlugin) {
            FetchTaskPlugin fetchTaskPlugin = (FetchTaskPlugin) plugin;
            instance.register(fetchTaskPlugin.getFetchTasks());
        }
    }
}
Also used : FetchTaskPlugin(com.yelp.nrtsearch.server.plugins.FetchTaskPlugin) Plugin(com.yelp.nrtsearch.server.plugins.Plugin) FetchTaskPlugin(com.yelp.nrtsearch.server.plugins.FetchTaskPlugin)

Aggregations

FetchTaskPlugin (com.yelp.nrtsearch.server.plugins.FetchTaskPlugin)1 Plugin (com.yelp.nrtsearch.server.plugins.Plugin)1