Class FailSafeFailureHandlerWrapper

    • Constructor Detail

      • FailSafeFailureHandlerWrapper

        public FailSafeFailureHandlerWrapper​(FailureHandler delegate)
    • Method Detail

      • handle

        public void handle​(FailureContext context)
        Description copied from interface: FailureHandler
        Handle a generic failure.

        This method is expected to report the failure somewhere (logs, ...), then return as quickly as possible. Heavy error processing (sending emails, ...), if any, should be done asynchronously.

        Any error or exception thrown by this method will be caught by Hibernate Search and logged.

        Specified by:
        handle in interface FailureHandler
        Parameters:
        context - Contextual information about the failure (throwable, operation, ...)
      • handle

        public void handle​(EntityIndexingFailureContext context)
        Description copied from interface: FailureHandler
        Handle the failure of entity indexing.

        This method is expected to report the failure somewhere (logs, ...), then return as quickly as possible. Heavy error processing (sending emails, ...), if any, should be done asynchronously.

        Any error or exception thrown by this method will be caught by Hibernate Search and logged.

        Specified by:
        handle in interface FailureHandler
        Parameters:
        context - Contextual information about the failure (throwable, operation, ...)
      • failureFloodingThreshold

        public long failureFloodingThreshold()
        Description copied from interface: FailureHandler
        When this handler is used for handling mass indexing failures - returns the number of failures during one mass indexing beyond which the failure handler will no longer be notified. This threshold is reached separately for each indexed type. Otherwise, i.e. not in the context of mass indexing, this value is ignored.

        May be overridden by mass indexer parameters (see failureFloodingThreshold(long) in the MassIndexer interface).

        Specified by:
        failureFloodingThreshold in interface FailureHandler