Class InputFailureRecorder

java.lang.Object
org.graylog2.plugin.InputFailureRecorder

public class InputFailureRecorder extends Object
Record failures from MessageInputs that happen during runtime. It will toggle the IOState between FAILING and RUNNING and also log the exception. The InputFailureRecorder is usually passed into the Transport of Inputs through ThrottleableTransport2.doLaunch(MessageInput, InputFailureRecorder)
  • Constructor Details

  • Method Details

    • setFailing

      public void setFailing(Class<?> loggingClass, String error)
      Set the input into the FAILING state.
      Parameters:
      loggingClass - the calling class which will be used to log the error
      error - the error message
    • setFailing

      public void setFailing(Class<?> loggingClass, String error, @Nullable Throwable e)
      Set the input into the FAILING state.
      Parameters:
      loggingClass - the calling class which will be used to log the error
      error - the error message
      e - the exception leading to the error
    • setRunning

      public void setRunning()
      Set the input back into RUNNING state. Call this once the error has resolved itself.