Class IndexRebuildService
- java.lang.Object
-
- org.opencastproject.index.rebuild.IndexRebuildService
-
- All Implemented Interfaces:
org.osgi.framework.BundleActivator
public class IndexRebuildService extends Object implements org.osgi.framework.BundleActivator
The bundle activator is defined in the pom.xml of this bundle.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIndexRebuildService.ServiceThe services whose data is indexed by ElasticSearch.
-
Constructor Summary
Constructors Constructor Description IndexRebuildService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidrebuildIndex(org.opencastproject.elasticsearch.index.AbstractSearchIndex index)Clear and rebuild the index from all services.voidrebuildIndex(org.opencastproject.elasticsearch.index.AbstractSearchIndex index, String serviceName)Partially rebuild the index from a specific service.voidstart(org.osgi.framework.BundleContext bundleContext)Called by OSGI when this bundle is started.voidstop(org.osgi.framework.BundleContext bundleContext)Called by OSGI when this bundle is stopped.
-
-
-
Method Detail
-
start
public void start(org.osgi.framework.BundleContext bundleContext) throws ExceptionCalled by OSGI when this bundle is started.- Specified by:
startin interfaceorg.osgi.framework.BundleActivator- Parameters:
bundleContext- The bundle context.- Throws:
Exception
-
stop
public void stop(org.osgi.framework.BundleContext bundleContext) throws ExceptionCalled by OSGI when this bundle is stopped.- Specified by:
stopin interfaceorg.osgi.framework.BundleActivator- Parameters:
bundleContext- The bundle context.- Throws:
Exception
-
rebuildIndex
public void rebuildIndex(org.opencastproject.elasticsearch.index.AbstractSearchIndex index) throws IOException, IndexRebuildExceptionClear and rebuild the index from all services.- Parameters:
index- The index to rebuild.- Throws:
IOException- Thrown if the index cannot be cleared.IndexRebuildException- Thrown if the index rebuild failed.
-
rebuildIndex
public void rebuildIndex(org.opencastproject.elasticsearch.index.AbstractSearchIndex index, String serviceName) throws IllegalArgumentException, IndexRebuildExceptionPartially rebuild the index from a specific service.- Parameters:
index- The index to rebuild.serviceName- The name of theIndexRebuildService.Service.- Throws:
IllegalArgumentException- Thrown if the service doesn't exist.IndexRebuildException- Thrown if the index rebuild failed.
-
-