Class LoggingFailureHandler

java.lang.Object
com.inductiveautomation.historian.gateway.api.storage.strategy.handler.LoggingFailureHandler
All Implemented Interfaces:
FailureHandlingStorageStrategy.StorageFailureHandler

public final class LoggingFailureHandler extends Object implements FailureHandlingStorageStrategy.StorageFailureHandler
A FailureHandlingStorageStrategy.StorageFailureHandler that logs failed points and discards them. For engines with no durable destination behind them.
  • Method Details

    • create

      public static LoggingFailureHandler create(LoggerEx logger)
      Creates a handler that reports failures at Level.ERROR.
      Parameters:
      logger - the logger the failures are reported to.
      Returns:
      a new LoggingFailureHandler.
    • create

      public static LoggingFailureHandler create(LoggerEx logger, org.slf4j.event.Level level)
      Creates a handler that reports failures at level.
      Parameters:
      logger - the logger the failures are reported to.
      level - the level the failures are logged at.
      Returns:
      the new handler.
    • handleFailure

      public void handleFailure(TemporalPointType type, List<? extends TemporalPoint<?,?>> failedPoints, Exception failureReason)
      Description copied from interface: FailureHandlingStorageStrategy.StorageFailureHandler
      Handles points that failed to store.
      Specified by:
      handleFailure in interface FailureHandlingStorageStrategy.StorageFailureHandler
      Parameters:
      type - the temporal-point family of the failed points, shared by all of them
      failedPoints - the points that failed to store; never empty
      failureReason - why the store failed: the result's exception, or a synthesized one