@Override public void init() { luceneDataSource = life.add(new LuceneDataSource(config, indexStore, fileSystemAbstraction)); // TODO Don't do this here, do proper life cycle management life.start(); LuceneIndexImplementation indexImplementation = new LuceneIndexImplementation(luceneDataSource); indexProviders.registerIndexProvider( LuceneIndexImplementation.SERVICE_NAME, indexImplementation); }
@Override public void stop() throws Throwable { indexProviders.unregisterIndexProvider(IDENTIFIER); }
@Override public void start() throws Throwable { indexProviders.registerIndexProvider(IDENTIFIER, this); }
@Override public void shutdown() { indexProviders.unregisterIndexProvider(LuceneIndexImplementation.SERVICE_NAME); // TODO Don't do this here, do proper life cycle management life.shutdown(); }