Class AbstractIndexProducer
java.lang.Object
org.opencastproject.elasticsearch.index.rebuild.AbstractIndexProducer
- All Implemented Interfaces:
IndexProducer
- Direct Known Subclasses:
AssetManagerImpl,EventCommentDatabaseServiceImpl,SchedulerServiceImpl,SearchServiceIndex,SeriesServiceImpl,WorkflowServiceImpl
This implementation of IndexProducer adds logging methods for convenience.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidlogIndexRebuildBegin(org.slf4j.Logger logger, int total, String elementName) Log beginning of index rebuild for this service.protected voidlogIndexRebuildBegin(org.slf4j.Logger logger, int total, String elementName, Organization org) Log beginning of index rebuild for this service and a specific organization.protected voidlogIndexRebuildError(org.slf4j.Logger logger, int total, int current, Throwable t) Log an error during an index rebuild for this service.protected voidlogIndexRebuildError(org.slf4j.Logger logger, Throwable t) Log an error during an index rebuild for this service.protected voidlogIndexRebuildError(org.slf4j.Logger logger, Throwable t, Organization org) Log an error during an index rebuild for this service.protected voidlogIndexRebuildProgress(org.slf4j.Logger logger, int total, int current) Log the progress of the index rebuild for this service.protected voidlogIndexRebuildProgress(org.slf4j.Logger logger, int total, int current, int batchSize) Log the progress of the index rebuild for this service.protected voidlogIndexRebuildProgress(org.slf4j.Logger logger, int total, int current, int batchSize, Organization org) Log the progress of the index rebuild for this service.protected voidlogIndexRebuildProgress(org.slf4j.Logger logger, int total, int current, Organization org) Log the progress of the index rebuild for this service and a specific organization.protected voidlogSkippingElement(org.slf4j.Logger logger, String elementName, String element, Throwable t) Log an error when one element can't be re-indexed.protected voidlogSkippingElement(org.slf4j.Logger logger, String elementName, String element, Organization org, Throwable t) Log an error when one element can't be re-indexed.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opencastproject.elasticsearch.index.rebuild.IndexProducer
dataTypeSupported, getService, getSupportedDataTypes, repopulate
-
Constructor Details
-
AbstractIndexProducer
public AbstractIndexProducer()
-
-
Method Details
-
logIndexRebuildBegin
Log beginning of index rebuild for this service.- Parameters:
logger- An slf4j logger to preserve the context.total- The total amount of elements to be re-added.elementName- The elements to be added (e.g. 'events').
-
logIndexRebuildBegin
protected void logIndexRebuildBegin(org.slf4j.Logger logger, int total, String elementName, Organization org) Log beginning of index rebuild for this service and a specific organization.- Parameters:
logger- An slf4j logger to preserve the context.total- The total amount of elements to be re-added.elementName- The elements to be added (e.g. 'events').org- The organization.
-
logIndexRebuildProgress
protected void logIndexRebuildProgress(org.slf4j.Logger logger, int total, int current) Log the progress of the index rebuild for this service.- Parameters:
logger- An slf4j logger to preserve the context.total- The total amount of elements to be re-added.current- The amount of elements that have already been re-added.
-
logIndexRebuildProgress
protected void logIndexRebuildProgress(org.slf4j.Logger logger, int total, int current, Organization org) Log the progress of the index rebuild for this service and a specific organization.- Parameters:
logger- An slf4j logger to preserve the context.total- The total amount of elements to be re-added.current- The amount of elements that have already been re-added.org- The organization.
-
logIndexRebuildProgress
protected void logIndexRebuildProgress(org.slf4j.Logger logger, int total, int current, int batchSize) Log the progress of the index rebuild for this service.- Parameters:
logger- An slf4j logger to preserve the context.total- The total amount of elements to be re-added.current- The amount of elements that have already been re-added.batchSize- The size of the batch we re-add in one go.
-
logIndexRebuildProgress
protected void logIndexRebuildProgress(org.slf4j.Logger logger, int total, int current, int batchSize, Organization org) Log the progress of the index rebuild for this service.- Parameters:
logger- An slf4j logger to preserve the context.total- The total amount of elements to be re-added.current- The amount of elements that have already been re-added.batchSize- The size of the batch we re-add in one go.org- The organization (can be null).
-
logSkippingElement
protected void logSkippingElement(org.slf4j.Logger logger, String elementName, String element, Throwable t) Log an error when one element can't be re-indexed.- Parameters:
logger- An slf4j logger to preserve the context.elementName- The name of the element that can't be added (e.g. 'event').element- The element that can't be added.t- The error that occurred.
-
logSkippingElement
protected void logSkippingElement(org.slf4j.Logger logger, String elementName, String element, Organization org, Throwable t) Log an error when one element can't be re-indexed.- Parameters:
logger- An slf4j logger to preserve the context.elementName- The name of the element that can't be added (e.g. 'event').element- The element that can't be added.org- The organization.t- The error that occurred.
-
logIndexRebuildError
Log an error during an index rebuild for this service.- Parameters:
logger- An slf4j logger to preserve the context.t- The error that occurred.
-
logIndexRebuildError
Log an error during an index rebuild for this service.- Parameters:
logger- An slf4j logger to preserve the context.total- The total amount of elements to be re-added.current- The amount of elements that have already been re-added.t- The error that occurred.
-
logIndexRebuildError
Log an error during an index rebuild for this service.- Parameters:
logger- An slf4j logger to preserve the context.t- The error that occurred.org- The organization.
-