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 Summary
Modifier and TypeMethodDescriptionstatic LoggingFailureHandlerCreates a handler that reports failures atLevel.ERROR.static LoggingFailureHandlerCreates a handler that reports failures atlevel.voidhandleFailure(TemporalPointType type, List<? extends TemporalPoint<?, ?>> failedPoints, Exception failureReason) Handles points that failed to store.
-
Method Details
-
create
Creates a handler that reports failures atLevel.ERROR.- Parameters:
logger- the logger the failures are reported to.- Returns:
- a new
LoggingFailureHandler.
-
create
Creates a handler that reports failures atlevel.- 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.StorageFailureHandlerHandles points that failed to store.- Specified by:
handleFailurein interfaceFailureHandlingStorageStrategy.StorageFailureHandler- Parameters:
type- the temporal-point family of the failed points, shared by all of themfailedPoints- the points that failed to store; never emptyfailureReason- why the store failed: the result's exception, or a synthesized one
-