Package org.graylog2.plugin
Class InputFailureRecorder
java.lang.Object
org.graylog2.plugin.InputFailureRecorder
Record failures from
MessageInput
s 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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
setFailing
(Class<?> loggingClass, String error) Set the input into the FAILING state.void
setFailing
(Class<?> loggingClass, String error, Throwable e) Set the input into the FAILING state.void
Set the input back into RUNNING state.
-
Constructor Details
-
InputFailureRecorder
-
-
Method Details
-
setFailing
Set the input into the FAILING state.- Parameters:
loggingClass
- the calling class which will be used to log the errorerror
- the error message
-
setFailing
Set the input into the FAILING state.- Parameters:
loggingClass
- the calling class which will be used to log the errorerror
- the error messagee
- 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.
-