Class AbstractIndexProducer
- java.lang.Object
-
- org.opencastproject.index.rebuild.AbstractIndexProducer
-
- All Implemented Interfaces:
IndexProducer
public abstract class AbstractIndexProducer extends Object implements IndexProducer
This implementation of IndexProducer adds logging methods for convenience.
-
-
Constructor Summary
Constructors Constructor Description AbstractIndexProducer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidlogIndexRebuildBegin(org.slf4j.Logger logger, String indexName, int total, String elementName)Log beginning of index rebuild for this service.protected voidlogIndexRebuildBegin(org.slf4j.Logger logger, String indexName, int total, String elementName, org.opencastproject.security.api.Organization org)Log beginning of index rebuild for this service and a specific organization.protected voidlogIndexRebuildError(org.slf4j.Logger logger, String indexName, int total, int current, Throwable t)Log an error during an index rebuild for this service.protected voidlogIndexRebuildError(org.slf4j.Logger logger, String indexName, Throwable t)Log an error during an index rebuild for this service.protected voidlogIndexRebuildError(org.slf4j.Logger logger, String indexName, Throwable t, org.opencastproject.security.api.Organization org)Log an error during an index rebuild for this service.protected voidlogIndexRebuildProgress(org.slf4j.Logger logger, String indexName, int total, int current)Log the progress of the index rebuild for this service.protected voidlogIndexRebuildProgress(org.slf4j.Logger logger, String indexName, int total, int current, int batchSize)Log the progress of the index rebuild for this service.protected voidlogIndexRebuildProgress(org.slf4j.Logger logger, String indexName, int total, int current, int batchSize, org.opencastproject.security.api.Organization org)Log the progress of the index rebuild for this service.protected voidlogIndexRebuildProgress(org.slf4j.Logger logger, String indexName, int total, int current, org.opencastproject.security.api.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, org.opencastproject.security.api.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, wait
-
Methods inherited from interface org.opencastproject.index.rebuild.IndexProducer
getService, repopulate
-
-
-
-
Method Detail
-
logIndexRebuildBegin
protected void logIndexRebuildBegin(org.slf4j.Logger logger, String indexName, int total, String elementName)Log beginning of index rebuild for this service.- Parameters:
logger- An slf4j logger to preserve the context.indexName- The name of the index that's being rebuild.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, String indexName, int total, String elementName, org.opencastproject.security.api.Organization org)Log beginning of index rebuild for this service and a specific organization.- Parameters:
logger- An slf4j logger to preserve the context.indexName- The name of the index that's being rebuild.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, String indexName, int total, int current)Log the progress of the index rebuild for this service.- Parameters:
logger- An slf4j logger to preserve the context.indexName- The name of the index that's being rebuild.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, String indexName, int total, int current, org.opencastproject.security.api.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.indexName- The name of the index that's being rebuild.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, String indexName, 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.indexName- The name of the index that's being rebuild.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, String indexName, int total, int current, int batchSize, org.opencastproject.security.api.Organization org)Log the progress of the index rebuild for this service.- Parameters:
logger- An slf4j logger to preserve the context.indexName- The name of the index that's being rebuild.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, org.opencastproject.security.api.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.t- The error that occurred.org- The organization.
-
logIndexRebuildError
protected void logIndexRebuildError(org.slf4j.Logger logger, String indexName, Throwable t)Log an error during an index rebuild for this service.- Parameters:
logger- An slf4j logger to preserve the context.indexName- The name of the index that's being rebuild.t- The error that occurred.
-
logIndexRebuildError
protected void logIndexRebuildError(org.slf4j.Logger logger, String indexName, int total, int current, Throwable t)Log an error during an index rebuild for this service.- Parameters:
logger- An slf4j logger to preserve the context.indexName- The name of the index that's being rebuild.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
protected void logIndexRebuildError(org.slf4j.Logger logger, String indexName, Throwable t, org.opencastproject.security.api.Organization org)Log an error during an index rebuild for this service.- Parameters:
logger- An slf4j logger to preserve the context.indexName- The name of the index that's being rebuild.t- The error that occurred.org- The organization.
-
-