Class AbstractIndexProducer

java.lang.Object
org.opencastproject.elasticsearch.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
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    logIndexRebuildBegin(org.slf4j.Logger logger, int total, String elementName)
    Log beginning of index rebuild for this service.
    protected void
    logIndexRebuildBegin(org.slf4j.Logger logger, int total, String elementName, org.opencastproject.security.api.Organization org)
    Log beginning of index rebuild for this service and a specific organization.
    protected void
    logIndexRebuildError(org.slf4j.Logger logger, int total, int current, Throwable t)
    Log an error during an index rebuild for this service.
    protected void
    logIndexRebuildError(org.slf4j.Logger logger, Throwable t)
    Log an error during an index rebuild for this service.
    protected void
    logIndexRebuildError(org.slf4j.Logger logger, Throwable t, org.opencastproject.security.api.Organization org)
    Log an error during an index rebuild for this service.
    protected void
    logIndexRebuildProgress(org.slf4j.Logger logger, int total, int current)
    Log the progress of the index rebuild for this service.
    protected void
    logIndexRebuildProgress(org.slf4j.Logger logger, int total, int current, int batchSize)
    Log the progress of the index rebuild for this service.
    protected void
    logIndexRebuildProgress(org.slf4j.Logger logger, int total, int current, int batchSize, org.opencastproject.security.api.Organization org)
    Log the progress of the index rebuild for this service.
    protected void
    logIndexRebuildProgress(org.slf4j.Logger logger, 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 void
    logSkippingElement(org.slf4j.Logger logger, String elementName, String element, Throwable t)
    Log an error when one element can't be re-indexed.
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.opencastproject.elasticsearch.index.rebuild.IndexProducer

    dataTypeSupported, getService, getSupportedDataTypes, repopulate
  • Constructor Details

    • AbstractIndexProducer

      public AbstractIndexProducer()
  • Method Details

    • logIndexRebuildBegin

      protected void logIndexRebuildBegin(org.slf4j.Logger logger, int total, String elementName)
      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, 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.
      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, 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.
      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, 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.
      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.
      org - The organization.
      t - The error that occurred.
    • logIndexRebuildError

      protected void logIndexRebuildError(org.slf4j.Logger logger, Throwable t)
      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

      protected void logIndexRebuildError(org.slf4j.Logger logger, 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.
      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, 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.
      t - The error that occurred.
      org - The organization.